Deploying Dynamicweb to Microsoft Azure

This document describes the process for deploying a Dynamicweb 9 solution to Azure. We will look at two scenarios:

  • Deploying a new Dynamicweb 9 solution
  • Moving an existing Dynamicweb 9 solution

To follow this how-to you must have:

  • An existing Microsoft Azure subscription
  • A working DW9 website

Databases created by the Dynamicweb 9 installer work on Azure out of the box. The same is true for the Dynamicweb 9 version of Wrap. Older databases may require some massaging to work on Azure – the steps required are outside the scope of this guide. Please refer to Microsoft documentation.

Dynamicweb service desk cannot help with Azure hosting issues as we have no certified Azure experts or any experience with running websites in Azure. When choosing to host on Azure, the Azure support has to be taken care of by you or a Azure specialist that you hook up with.

You can choose 2 types of Azure hosting - Web apps or Azure VMs. Web apps is only recommended for smaller solutions and not for solutions with lots of indexing, integration and other operations that can be ressource incentive.

There are two scenarios when deploying to Azure:

  • Deploying a new Dynamicweb 9 solution
  • Moving an existing Dynamicweb 9 solution

Both are described below.

Start by creating a resource group:

  • Click Resource Groups > Add (Figure 3.1)
Figure 3.1 Add a resource group
  • Enter name and select a subscription and location (Figure 3.2)
Figure 3.2 Provide the relevant details

Then create an SQL Server and an empty database:

  • Click SQL Databases > Add (Figure 4.1)
Figure 4.1 Add an SQL database
  • Create an SQL server (Figure 4.2)
Figure 4.2 Create an SQL server
  • Create an empty database (Figure 4.3)
Figure 4.3 Configure the empty database

Next create an App Service to host your application:

  • Click App Services > Add (Figure 5.1)
Figure 5.1 Add an app service
  • Select WebApp and pick an appropriate pricing plan (Figure 5.2)
Figure 5.2 Select WebApp and select a pricing plan

You can now upload your Dynamicweb application:

  • Go to App Services and open your App Service
  • Under overview locate the FTP hostname and username (Figure 6.1)
Figure 6.1 Locate the FTP hostname and username
  • Using whatever ftp client you like connect to your app service storage and upload your DW9 application folder (Figure 6.2)
Figure 6.2 Connect via FTP and upload the application folder

Next you must configure the Dynamicweb application:

  • Go to app services and select your app.
  • Under Application settings set .NET Framework version to 4.6 and Platform to 64 bit (Figure 7.1)
Figure 7.1 Set .NET framework to 4.6 and platform to 64 bit
  • Under Virtual applications and directories edit the root path to point to your application folder (Figure 7.2)
Figure 7.2 Point root path to your application folder

You can now run the Dynamicweb installer:

  • Locate your app in App services and go to Overview
  • Find the URL for your application and access it (Figure 8.1)
Figure 8.1 Locate URL and click it to run the Dynamicweb Installer
  • This launches the Dynamicweb installer (Figure 8.2)
Figure 8.2 Installing DW9 on Azure
  • On step 2 select “Create a new /Files Folder” (Figure 8.3)
Figure 8.3 Select 'Create a new /Files folder'
  • On step 3 select “Azure database” and fill in the connection settings (if you have forgotten you can find them in the Azure portal under SQl databases) (Figure 9.1)
Figure 9.1 Select 'Azure database'
  • Select an appropriate license in step 4 and create your Administrator user in step 5 (Figure 9.2)
  • You can now access the admin interface and start using Dynamicweb 9
Figure 9.2 You're done! Hurrah!

To deploy an existing solution to Azure, create a Resource group, SQL server, App service and App as described above.

You must then migrate your existing database to Azure:

  • Open SQL-Server Management Studio and locate your database. Right click the database, choose tasks, deploy database to SQL Azure (Figure 10.1)
  • Run through the wizard using the server info from SQL databases in Azure portal. 
Figure 10.1 Deploy the database to Azure

If migration fails examine the log and fix whatever issues exist with your database and try again

Next, you must upload the Files folder of your existing solution:

  • Connect to your app service storage via ftp.
  • Navigate to your Application folder and upload Files folder to here
Figure 11.1 Upload the FIles folder to your application folder

You can place the Files folder elsewhere if you want, but in that case you will need to create a virtual folder reference in the Azure App settings interface.

The database just deployed to SQL Azure, needs to be connected to Dynamicweb

  • Connect to the ftp
  • Browse to /site/wwwroot/Files and open GlobalSettings.aspx in an editor
  • Update the database section in GlobalSettings.aspx according to connection properties found on the Azure portal (Figure 12.1)
Figure 12.1 Edit the GlobalSettings file and use the connection properties from Azure

  • When new versions of Dynamicweb are released, copy the new application folder to /site/wwwroot/ and overwrite the files already there.
  • Make sure new settings from the web.config in the Dynamicweb application are copied as well
  • It is recommended to delete everything from /site/wwwroot/bin/ before updating.
    • Do not remove custom dlls

To run tasks from Dynamicweb, Azure must have some sort of scheduler set up. Previously, we recommended using Azure scheduler to accomplish this - but this tool is being phased out.

Azure recommends using Azure Logic Apps to send HTTP requests to taskexecute.exe:

  • Create a blank logic app (Figure 14.1)
Figure 14.1 Create a blank logic app
  • Add an HTTP trigger (Figure 14.2)
Figure 14.2 Add an HTTP trigger
  • Configure the trigger (Figure 14.3):
    • Method: Post
    • Url:
    • Interval: 5
    • Frequency: Minute
Figure 14.3 Configuring the trigger