Microsoft Azure Web Apps

Microsoft Azure Web Apps (renamed from Azure Websites, see details) are quick to deploy and easy to set up and manage. However, they do not offer as many customization options as cloud services. For a more detailed comparison, see Azure Web Sites, Cloud Services and Virtual Machines comparison on MSDN.

You can create Kentico websites using the Azure Web Apps service:

When you have a web app created, you can manage its files over an FTP connection.

Creating Web Apps from Web Application Gallery

You can find a Kentico package in the application gallery. Creating new web apps using the provided template is quick and easy.

  1. Open the Azure Management Portal.
  2. Click New -> Compute -> Web App -> From gallery.
  3. Select Kentico CMS for ASP.NET.
  4. Click Next.
  5. Type the URL (name) of your web app.
  6. Choose to create a new SQL database.
  7. Choose a region (location) for your web app.

    Creating the Windows Azure Web App with the Kentico package

  8. Click Next.
  9. Type the name of the database
  10. Create a new server or choose an existing server for the database and provide login credentials.
  11. Complete the creation.

Database installation

  1. Access the created website.
  2. Provide the server name and credentials for the server used to create the database in.
  3. Click Next.
  4. Select Use an existing database and type the name of the database created for the website.
  5. Click Next.
  6. Click Next without filling any field.
  7. Select Import existing Kentico CMS website and click Next.
    • The installer redirects you to the administration interface.
  8. Switch to the Licenses tab and add the license for the website domain.

Creating Web Apps from Visual Studio

This scenario presumes that you already have an installed Kentico web project on a local computer and you want to deploy it as Microsoft Azure Web App.

In Microsoft Visual Studio 2012 and 2013, the service is still called Azure Websites.

  1. Open your web project in Visual Studio.
  2. Open the Server Explorer tab (or Database Explorer tab in Express editions of Visual Studio).
  3. Right-click Windows Azure/Web Sites and select Add New Site...
    • A window Create site on Windows Azure opens.
  4. Type the web app name (URL).
  5. Select the location for your web app.
  6. Select an existing database server or create a new one.
  7. Provide the credentials for the server.

    Creating an Azure Web App from Visual Studio

  8. Click Create.

Visual Studio creates the Web App. Continue with adjusting the configuration of the web.config file and deploying your project.

  1. Right-click the created web app and select View settings.
  2. Copy the connection string value and paste it to the CMSApp/web.config file of your web project.

    <connectionStrings>
        <add name="CMSConnectionString" connectionString="Data Source=tcp:YourServerName.database.windows.net,1433;Initial Catalog=YourDatabaseName;User Id=YourUsername@YourServerName;Password=YourPassword;" />
    </connectionStrings>

    Replace YourServerNameYourDatabaseName, YourUsername and YourPassword with your own values.

     

    Configuring the connection string after the deployment

    You can also configure the connection string through the Azure Management Portal in Web Apps -> select a web app -> Configure tab -> connection strings section. To set the connection string for the web app, change the DefaultConnection name to CMSConnectionString.

    .

  3. Make sure that the sessionState mode is set to InProc in the web.config file.

    <sessionState mode="InProc" />
  4. Right-click the project folder (CMSApp or CMS) in the Solution Explorer and select Publish (or Publish Web Site).
  5. Click Import.
  6. Select the created web app in the drop-down list.
  7. Click OK.
  8. Leave the settings as they are.

    Deploying a web project from Visual Studio to Azure Web Apps

  9. Click Publish.
  10. When the project is published and the website of your project is automatically opened in a browser, complete the database installation.

Uploading files to Microsoft Azure Web Apps over FTP

When you have created Azure Web Apps and deployed your web project, you can manage its files over an FTP connection:

  1. Open the Azure Management Portal.
  2. Select your web app on the Web Apps tab.
  3. Switch to the Dashboard tab.
  4. Click Set up deployment credentials.
  5. Type a user name and password and click OK.
  6. Use the FTP host name and Deployment / FTP User information to configure your FTP client.

    Creating an FTP connection to a created web app

When you connect to your web app project, you can see the following folders:

  • Logfiles - contains website specific diagnostics log files.
  • site  - contains website files.