Publish Azure Application Wizard
Updated: August 15, 2014
After you develop a web application in Visual Studio, you can publish that application more easily to Azure by using the Publish Azure Application wizard. The following section explains the steps that you must complete before you use the wizard, and the remaining sections explain the features of the wizard.
Before You Publish Your Application
Choosing Your Subscription
Configuring Your Settings
Publishing Your Application
You must perform the following tasks before you can use the Publish Azure Application wizard:
Obtain a Microsoft account and an Azure subscription.
Enable your web application for Azure.
If you have already completed these tasks, you can skip the following two paragraphs.
After you obtain a Microsoft account and an Azure subscription, you must create a cloud service and a storage account. You can do this from Server Explorer, or by using the Management Portal. For more information about how to set up your Azure environment, see Setting Up Services Required to Publish a Cloud Service from Visual Studio.
To enable your web application for Azure, you must create an Azure project with a web role in Visual Studio, and that project must be associated with the project for your application. To create the associated Azure project, open the shortcut menu for the project for your application, and then choose Convert, Convert to Azure Cloud Service Project. After the Azure project is added to your solution, open the same shortcut menu again, and then choose Publish . For more information about how to enable applications for Azure, see How to: Migrate and Publish a Web Application to an Azure Cloud Service from Visual Studio.
|You must invoke Visual Studio with administrator credentials (Run As Administrator).|
When you are ready to publish your application, open the shortcut menu for the Azure project, and then choose Publish. The following illustration shows the Publish Azure Application wizard.
Before you use the wizard for the first time, you must sign in. Choose the Sign In link. Sign in to the Azure portal when prompted, provide your Azure user name and password.
The list of subscriptions populates with the subscriptions associated with your account. You might also see subscriptions from any subscription files that you imported previously.
In the Choose your subscription list, choose the subscription to use for this deployment. If you choose <Manage…>, the Manage Subscriptions dialog box appears, and you can create, edit, or delete subscriptions. You can also sign out of one account and sign in with a different account, if necessary.
The Accounts tab in the Manage Subscription dialog shows the subscriptions associated with your accounts. If you imported any subscriptions from a subscription file, you can see these under the Certificates tab.
Note A subscription file can contain more than one subscription.
Choose Next to continue.
If there aren't any cloud services in your subscription, you need to create a cloud service in Azure to host your project. The Create Cloud Service and Storage Account dialog box appears.
Specify a new name for the cloud service. The name must be unique in Azure. Then specify a region or affinity group for a data center that’s near you or most of your clients. This name is also used for a new storage account that Azure creates for your cloud service.
At this point, you can publish the application, or you can modify any setting for this deployment. If you are ready to publish, choose Publish to deploy this application. Otherwise, choose Next to continue.
Note If you chose Publish in this step, you can monitor the status of this deployment in Visual Studio.
You can modify both common and advanced settings for a deployment by using the Publish Azure Application wizard. For example, you can choose a setting to deploy your application to a test environment before you release it. The following illustration shows the Common Settings tab for an Azure deployment.
In the Cloud service list, perform one of the following sets of steps:
Choose an existing service. The data center location for this cloud service appears. You should note this location and make sure that your storage account location is in the same data center.
Choose Create New to create a cloud service that Azure hosts. In the Create Cloud Service dialog box, specify a name for the service, and then specify a region or affinity group to specify the location of the data center that you want to host this cloud service. The name must be unique in Azure.
- Choose an existing service. The data center location for this cloud service appears. You should note this location and make sure that your storage account location is in the same data center.
In the Environment list, choose either Production or Staging. Choose the staging environment if you want to deploy your application to a test environment. You can move your application to the production environment later.
In the Build configuration list, choose either Debug or Release.
In the Service configuration list, choose either Cloud or Local.
Select the Enable Remote Desktop for all roles check box to enable Remote Desktop. This option is primarily used for troubleshooting. When you select this check box, the Remote Desktop Configuration dialog box appears. Choose the Settings link to change the configuration.
Select the Enable Web Deploy for all web roles check box to enable web deployment. You must enable Remote Desktop to use this feature. For more information, see Publishing a Cloud Service using the Azure Tools. For more information about Web Deploy, see Publishing a Cloud Service using the Azure Tools.
Choose the Advanced Settings tab. In the Deployment label field, either accept the default name, or enter a name of your choosing. To append the date to the deployment label, leave the check box selected.
In the Storage account list, choose the storage account to use for this deployment. Compare the locations of the data centers for your cloud service and your storage account. Ideally, these locations should be the same.
Note The Azure storage account stores the package for the application deployment. After the application is deployed, the package is removed from the storage account.
Select the Deployment update check box if you want to deploy only updated components. This type of deployment can be faster than a full deployment. Choose the Settings link to open the Deployment update settings dialog box, shown in the following illustration.
You can choose either of two options for update deployment, incremental or simultaneous. An incremental deployment updates one deployed instance at a time, so that your application remains online and available to users. A simultaneous deployment updates all deployed instances at once. Simultaneous update is faster than incremental update, but if you choose this option, your application might not be available during the update process.
You should select the check box for If deployment can't be updated, do a full deployment if you want the full deployment to take place automatically if an update deployment fails. A full deployment resets the virtual IP (VIP) address for the cloud service. For more information, see How to: Retain a Constant Virtual IP Address for a Cloud Service.
To debug your service, select the Enable IntelliTrace check box, or if you are deploying a Debug configuration, and want to debug your cloud service in Azure, select the Enable Remote Debugger for all roles checkbox to deploy the remote debugging services.
To profile this application, select the Enable profiling check box, and then choose the Settings link to display the profiling options.
Important You must use Visual Studio Ultimate to enable either IntelliTrace or Tier Interaction Profiling (TIP), and you can't enable both at the same time.
For more information, see Debugging a Published Cloud Service with IntelliTrace and Visual Studio and Testing the Performance of a Cloud Service.
Choose Next to view the summary page for the application.
You can create a publishing profile from the settings that you have chosen. For example, you might have one profile for a test environment and another for production. To save this profile, choose the Save icon. The wizard creates the profile and saves it in the Visual Studio project. To modify the profile name, open the Target profile list, and then choose <Manage…>.
Note The publishing profile appears in Solution Explorer in Visual Studio, and the profile settings are written to a file with an .azurePubxml extension. Settings are saved as attributes of XML tags.
Choose Publish to publish your application. You can monitor the process status in the Output pane in Visual Studio.
ConceptsSetting Up Services Required to Publish a Cloud Service from Visual Studio
How to: Migrate and Publish a Web Application to an Azure Cloud Service from Visual Studio
Publishing a Cloud Service using the Azure Tools
Debugging a Published Cloud Service with IntelliTrace and Visual Studio
Testing the Performance of a Cloud Service