Is this really the version you are looking for? Kentico Xperience 10 Documentation is no longer updated. Use the switcher in the header to choose your product version.
For projects hosted in Microsoft Azure Cloud Services, you need to perform the entire upgrade on a local machine and then redeploy the project after the upgrade is successfully completed.
Completing the upgrade procedure may take a significant amount of time, particularly for heavily customized projects. We recommend that you keep your production site running and first perform a local upgrade of your project to upgrade your code files and try out the database upgrade in advance. Then you need to take your website offline and repeat the process for a copy of the production database.
Choose the upgrade procedure according to your Azure environment:
We do NOT recommend upgrading your database on an Azure SQL server directly, as this may prevent the upgrade script from performing certain changes in the database.
See also: Running Kentico on Microsoft Azure
We recommend that you perform the first site request and testing after the upgrade of an Azure project through the local emulator.
First upgrade your project code files in a local environment and try out the upgrade of your database.
Create a copy of your Azure database on the same Azure SQL server. Creating a copy of a running database ensures that the copied database stays consistent, unlike database export performed in the next step, which may result in a faulty export.
Export the copied Azure database and import it to your on premise server:
Open Microsoft SQL Server Management Studio and connect to your Azure SQL server (it is recommended to always use the latest version of Management Studio to remain compatible with Azure SQL Database updates).
Right-click the copied database and select Tasks -> Export Data-tier Application.
Save the database export to the disk.
Connect to your own SQL server.
Right-click the Databases node and select Import Data-tier Application.
Import the exported database to your server.
Set up your project in a local development environment (emulated) and set the connection strings for the CMSApp and SmartSearchWorker roles to connect to the imported database on your server.
Increase the Connection Timeout value in the connection strings of the CMSApp and SmartSearchWorker roles. We recommend at least 600 seconds.
Perform the required Steps before the upgrade.
Install Microsoft Azure SDK version 2.9.5 (opens in a new tab) (or a newer version).
Run the upgrade utility for your local project (see Applying the upgrade).
The upgrade attempts to automatically update the project’s Microsoft Azure configuration files (ServiceConfiguration.cscfg, ServiceDefinition.csdef). This process may fail if your configuration files contain certain types of customizations. In this case, new files are created with the .new extension. You need to manually transfer your configuration to the new files and then replace the original ones.
The upgrade creates a new version of the SmartSearchWorker project’s app.config file with the .new extension. You need to manually transfer your configuration to the new file and then replace the original one.
If your CMSAzure project is customized, the upgrade creates a new version of CMSAzure.ccproj in the CMSAzure folder (with the .new extension). Transfer any customizations from your original CMSAzure.ccproj file and remove the .new extension from the new one.
Open the project in Visual Studio (using CMSAzure.sln) and start the site in the emulator. Wait for the upgrade procedure to finish.
Important: You always need to perform the first request on the upgraded site in a local development environment. Processing of the first request may take a longer than usual (up to an hour).
Perform the required Steps after the upgrade and test your site.
Remove the connection string from the Cloud configurations of both the CMSApp and SmartSearchWorker roles and deploy the project to your Microsoft Azure staging environment. See Deploying Azure projects to Cloud Services for more information.
When you have upgraded your code files and uploaded your project to the staging environment, you can now shut down your production website and upgrade the production database.
Run the SQL upgrade script on the imported database on your server:
Set the connection strings for the CMSApp and SmartSearchWorker roles to connect to the newly imported database on your server.
Open the Azure project in Visual Studio (using CMSAzure.sln) and start the site in the emulator. Wait for the upgrade procedure to finish.
Perform any database changes that you tracked previously during the test database upgrade.
Export your upgraded database from your on premise SQL server and import it to the Azure SQL server into a new database:
Export the upgraded database to a BACPAC file (opens in a new tab).
Import the BACPAC file to your Azure SQL Database (opens in a new tab).
We recommend that you do not delete the original database immediately and wait after you have tested the upgraded database.
Set the connection string of your previously deployed project in the staging environment to connect to the new upgraded database. Set the connection string for both the CMSApp and SmartSearchWorker roles.
Swap the staging deployment with your production deployment.
Open your website in the administration interface and open the Event log application and check if any errors occurred.
Your project files and database are now upgraded. When you have adequately tested your website and you are sure it is running as expected, you can delete your original Azure SQL database, the copied database and the staging deployment. You can also add the connection string to the Cloud configuration file of your local project to have it prepared for future deployments.
Upgrading Azure projects through a web application
If you are developing Azure projects locally as web applications, you can also upgrade your projects this way, without setting up the local emulator. The difference is that you set the connection string in the web.config file instead of the configuration files.
If you want to upgrade an Azure Web Apps project, the procedure is similar to upgrading a standard web site or web application project with the difference that you must export the database from the Azure SQL server and import it to your on premise server.
Create a copy of your Azure database on the same Azure SQL server. Creating a copy of a running database ensures that the copied database stays consistent, unlike database export performed in the next step, which may result in a faulty export.
Export the copied Azure database and import it to your on premise server:
Open Microsoft SQL Server Management Studio and connect to your Azure SQL server (it is recommended to always use the latest version of Management Studio to remain compatible with Azure SQL Database updates).
Right-click the copied database and select Tasks -> Export Data-tier Application.
Save the database export to the disk.
Connect to your own SQL server.
Right-click the Databases node and select Import Data-tier Application.
Import the exported database to your server.
Set the connection string in the web.config file of your project to the imported database on your server.
Perform the required Steps before the upgrade.
Run the upgrade utility for your local project (see Applying the upgrade).
Be sure to open the upgraded website in a browser and wait for the upgrade procedure to finish.
Perform the required Steps after the upgrade and test your site.
Remove the connection string from the web.config file and deploy the project to your Azure Web App. You can use a staging environment.
When you have upgraded your code files and uploaded your project to a staging environment, you can now shut down your production website and upgrade the production database.
Run the SQL upgrade script on the newly imported database on your server:
Set the connection string in the web.config file of your project to the new database on your server.
Open the project in a browser and wait for the upgrade procedure to finish.
Perform any database changes that you tracked previously during the test database upgrade.
Export your upgraded database from your on premise SQL server and import it to the Azure SQL server into a new database:
Export the upgraded database to a BACPAC file (opens in a new tab).
Import the BACPAC file to your Azure SQL Database (opens in a new tab).
We recommend that you do not delete the original database immediately and wait after you have tested the upgraded database.
Set the connection string of your previously deployed project (in the staging environment) to connect to the newly upgraded database.
Swap the staging deployment with your production deployment.
Open your website in the administration interface and open the Event log application and check if any errors occurred.
Your project files and database are now upgraded. When you have adequately tested your website and you are sure it is running as expected, you can delete your original Azure SQL database, the copied database and the staging deployment. You can also add the connection string in the web.config file of your local project to have it prepared for future deployments.