Whats new in Windows Azure SDK 1.5 - Local and Cloud Configuration setup for your Windows Azure Application

When you create a new application with Windows Azure SDK 1.5, you will see two separate Service Configuraiton files as below:

 

  1. ServiceConfiguration.Local.cscfg
    1. Use this file for local configuration which can be used for debugging your application in Compute Emulator
  2. ServiceConfiguration.Cloud.cscfg
    1. Use this configuration file to set your application for Windows Azure Cloud Deployment

 

You can open the Role Property Dialog to select which configuration you would want to change as below:

 

 

Once you have set the Service Configuration you can provide any desired setting. For example here in my local setting I am using Development Storage:

 

 

Following for the Cloud Configuration I am setting Windows Azure Storage credential to be used:

 

 After saving the configuration settings I can verify the changes by opening the configuration file.

 

Let’s open ServiceConfiguration.Local.cscfg and you can see we are using Development Storage:

 

 <?xml version="1.0" encoding="utf-8"?>
 <ServiceConfiguration serviceName="WindowsAzureProject1" xmlns="https://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="1" osVersion="*">
 <Role name="TestWebRoleMVC3">
 <Instances count="1" />
 <ConfigurationSettings>
 <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" />
 </ConfigurationSettings>
 </Role>
 </ServiceConfiguration>

 

 

Let’s open ServiceConfiguration.Local.cscfg and you can see we are using Windows Azure Storage account:

 

 <?xml version="1.0" encoding="utf-8"?>
 <ServiceConfiguration serviceName="WindowsAzureProject1" xmlns="https://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="1" osVersion="*">
 <Role name="TestWebRoleMVC3">
 <Instances count="1" />
 <ConfigurationSettings>
 <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="DefaultEndpointsProtocol=https;AccountName=teststorage;AccountKey=*************************************************==" />
 </ConfigurationSettings>
 </Role>
 </ServiceConfiguration>