Prepare the project for deployment

PREREQUISITES: Add Microsoft .NET framework 4.7.1 to your Azure project. For more information, see Install .NET on Azure Cloud Services roles.

  1. In Microsoft Visual Studio, modify the web.config file in the following way:

    NOTE: The database configuration storage mode allows to have shared storage (Azure SQL database) for all configuration changes, which is visible by all web role instances. Thus, changes made by one instance are automatically synchronized to all other instances. Backing up your database also backs up your configuration changes.

  • Verify project’s references in the following way:
    1. In the Solution Explorer, expand SitefinityWebApp » References.
    2. Make sure that all assemblies, which are referenced from SitefinityWebApp, including references to your custom libraries, have property Copy Local set to True, except the following:
      • .NET framework assemblies, which start with System, except System.Windows, which must have Copy Local set to True.
      • Microsoft.WindowsAzure.ServiceRuntime
      • MySql.Data and Telerik.OpenAccess.MySql.Data
        To view the properties of an assembly reference, select it and press ALT+ENTER.
  • Add the configuration and license files to the SitefinityWebApp project in the following way:
    1. In the Solution Explorer, select SitefinityWebApp » App_Data.
    2. Click Show All Files button on top of the Solution Explorer window.
    3. Expand the Sitefinity folder.
    4. In the context menu of folder Configuration, click Include in Project.
    5. Include also the license file (having a .lic file name extensions), which is under the Sitefinity folder.
      If needed, refresh the Solution Explorer.
    6. Edit the properties of the newly added license file by selecting it in the Solution Explorer and pressing ALT+ENTER.
    7. Change the value of the Build Action property from None to Content.
    8. Include any customized resources (labels) from the Sitefinity\Resources folder.
      This is also valid for Sitefinity CMS installations, which have language packs imported.
  • Add a new Azure Cloud Service project to the solution.
    To do this perform the following:
    1. In the context menu of your solution, click Add » New Project…
      Add New Project window appears.
    2. In the left pane, expand Visual C# and select Cloud.
    3. In the center pane, select Azure Cloud Service.
    4. Enter a name for the project and click OK.
    5. In the window that appears, do not create any roles and click OK.
      The wizard closes.
  • Add SitefinityWebApp as a web role.
    1. Under the newly created project, open the context menu of Roles.
    2. Click Add » Web Role Project in solution.
    3. Select SitefinityWebApp and click OK.
  • Configure the web role.
  • Double-click on the newly added web role.
    1. On the Configuration tab, specify the Instance count.
      This is the number of role instances that the Microsoft Azure Platform will create and run. You can change this number while the role is deployed and running.
    2. Specify the storage account credentials for the Diagnostics results in the following way:
      1. Get the storage account key by selecting the storage account in the Azure Management Portal. In the Settings section, select Access Keys.
        You can see the Primary Access Key.
      2. Click Copy to Clipboard button on the right.
        If a popup appears, asking to permit clipboard access to the Silverlight plugin, click Yes.
      3. Under Specify the storage account credentials for the Diagnostics results, click …
        The Storage Account Connection String dialog box appears.
      4. Select Enter storage account credentials radio button.
      5. Enter the account name and paste the key, you have copied.
    3. Go to the Endpoints tab and add an internal endpoint, using the HTTP protocol and name it SitefinityInternalEndpoint.
      Do not set the Public/Private Port and SSL Certificate Name settings. Sitefinity CMS relies on the existence and naming of this endpoint to synchronize the running instances of your web role.

      The following screenshot displays the internal endpoint:

      NOTE: When you add an internal HTTP endpoint, Visual Studio automatically adds a binding of the web role site to that endpoint. Sitefinity CMS relies on this to synchronize the communication among role instances (cache invalidation, etc.)

      If later you want to access your Sitefinity CMS website from the default browser port (80), you must have an endpoint of type Input, a protocol set to http, and public port set to 80.

    4. Open the Local Storage tab and click Add Local Storage.
    5. Add a 1024MB storage and name it LibrariesTemp.
      Make the storage to be cleaned on role recycle.

      The following screenshot displays the added local storage:

  • Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

    Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

    This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.

    Web Security for Sitefinity Administrators

    This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

    Foundations of Sitefinity ASP.NET Core Development

    The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

    Was this article helpful?