[This is prerelease documentation and is subject to change in future releases.]
The service configuration file sets configuration values for one or more role instances running within a service.
You may use a single configuration file to create multiple instances of a service. You may also use a different configuration file for each instance of a service.
The default extension for the service configuration file is .cscfg.
Sample Service Configuration File
The following code example shows a sample service configuration file for a service that includes a web role and a worker role:
<?xml version="1.0"?>
<ServiceConfiguration serviceName="MyService" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration">
<Role name="MyWebRole">
<Instances count="1" />
<ConfigurationSettings>
<Setting name="Setting1" value="Hello World!" />
</ConfigurationSettings>
</Role>
<Role name="MyWorkerProcess">
<Instances count="1" />
<ConfigurationSettings />
</Role>
</ServiceConfiguration>
Service Configuration Namespace
The XML namespace for the service configuration file is:
http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration
Service Configuration Schema Types
The following table describes the element types of the service configuration file.
See Also