Configuring a Windows Azure Cloud Service Project

When a Windows Azure Project (such as a WebRole) project is created, Visual Studio automatically creates two projects – the actual application (for example a WebRole web application) and a CloudService project which controls and defines how the application will run on Azure.

In the CloudService project there are two xml configuration files, ServiceDefinition.csdef and ServiceConfiguration.cscfg. ServiceDefinition.csdef outlines the requirements of the application and the Azure Roles (ie apps) it contains, it also contains configuration settings that apply to all instances. The ServiceConfiguration.cscfg provides the values for the requirements outlined in the ServiceDefinition.csdef file:

These configuration files can me adjusted manually, but for most common tasks the Properties window for the individual Roles (ie projects) will be a more convenient way to adjust the settings. To access the Properties window simply the appropriate Role in the Roles folder in the CloudService project. The Properties window is just a GUI for manipulating the configuration files and all changes should be instantly reflected in the xml of the configuration files:

In general across all Roles the below configuration settings are available:

  • .NET Trust Level – The permissions available to the role are dependent on the trust level it is assigned. For most Azure applications Full Trust is necessary as Windows Azure partial trust disables the Azure client libraries.
  • Instance Count  – The number of instances that this role will run on.
  • VM Size – The size of the Virtual Machine the Role will run in.
  • Settings Tab – This is a collection of settings used in the Role. You can add your own settings such as connection strings.
  • Endpoints Tab – Specifies the endpoints accessible by clients of the application.
  • Local Storage Tab – Specifies a windows azure storage resource for the role.
  • Certificates Tab – Associates certificates with the Role.

It is important to note that each Role in the solution will have separate configuration settings.






Array
Twitter Digg Delicious Stumbleupon Technorati Facebook Email

No comments yet... Be the first to leave a reply!