Deploy the database to Azure SQL

PREREQUISITES: You must use SQL Server Management Studio 2014 with Cumulative update package 6.

Before you publish your project to Azure Web Apps, you must upload your project's database to Azure SQL Database.
Perform the following:

  1. Open your SQL Server Management Studio.
  2. In the context menu of your database, click Tasks » Deploy Database to Windows Azure SQL Database.
  3. In Deployment Settings, enter a name for the database and click Connect.
    For more information about connectivity problems, see Troubleshoot Microsoft Azure SQL Database connectivity.
  4. In Server name, enter the 10-character server name, followed by .database.windows.net
  5. In Authentication, select SQL Server Authentication.
  6. Enter the administrator login name and password that you created when provisioning the SQL Database logical server.
  7. Click Options.
  8. Under Connection Properties, in Connect to database, enter master
    When you want to create a database on the Azure SQL Database server, you must connect to the master database.
  9. Click Connect » Next » Finish.
  10. Modify your connection string.
    1. Go to https://manage.windowsazure.com.
    2. In the Quick Glance section of the Dashboard tab, navigate to Databases » <Your database> » Show connection strings.
    3. Use the given template to change the connection string in your project’s DataConfig.config.
      The format of the connection string element is the following:
      <add dbType="SqlAzure" name="Sitefinity" connectionString="Server=<serverName>.database.windows.net;User ID=<userName>@<serverName>;Password=<password>;Database=<databaseName>; Trusted_Connection=False;Encrypt=True" providerName="System.Data.SqlClient" />

      NOTE: For Sitefinity CMS to function normally with SQL Azure, set the dbType attribute to SqlAzure.

Troubleshooting

If you receive an error similar to: Error SQL71564: The element User: [NT AUTHORITY\NETWORK SERVICE] has property AuthenticationType set to a value that is not supported in Microsoft Azure SQL Database v12 (Preview)…, remove all users that rely on local login from the database before starting the deployment procedure.

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

Web Security for Sitefinity Administrators

The free standalone Web Security lesson teaches administrators how to protect your websites and Sitefinity instance from external threats. Learn to 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?