Last week, I spoke about ServiceDefinition file and now it's about ServiceConfiguration.csdef file. Let's elaborate XML elements of this cloud configuration file.
The root element ServiceConfiguration
has only one attribute, namely serviceName
. The serviceName
attribute is a mandatory element in ServiceConfiguration
file. If you omit this attribute, Visual Studio is going to complain about your XML during compilation. The name of the service must match the name of the service in the service definition.
ServiceConfiguration
element can have only Role
elements as children. Because the only role we have is ASP.NET Web role, we can see only one Role
element. In case our project contained another role
, the Service Configuration file would reflect this fact.
Role
element also has a single name
attribute which is required. The name
attribute represents the name of the service and must match the name of the service in the service definition defined in the WebRole
element. The Role
element can have three children elements: Instances
, ConfigurationSettings
and Certificates
. In the image shown above, the number of cloud instance is marked as 1
. Certificates are related to the security methodology followed in the related cloud app.
Looking at our ServiceConfiguration.cscfg file, we can see that it contains ConfigurationSettings
and Instances
elements.
Ganesan Senthilvel is a passionate IT leader with demonstrated 2 decades’ experience in architecture, design and implementing cutting edge solutions to address business opportunities of Enterprise applications. He earned Masters in Computer Science and Master in Business Administration. Now, he is pursing Doctorate program in Big Data. He is consistent technical contributor via COE, Blog, Whitepaper, Summit, Certification, etc. and also highly skilled at providing coaching and mentoring to internal teams and external institutes. Earned Microsoft Certifications like MCP, MCAD and financial domain certification.
He maintains his weekly blog at http://ganesansenthilvel.blogspot.in