Click here to Skip to main content
15,890,123 members
Articles / All Topics

ServiceConfiguration

Rate me:
Please Sign up or sign in to vote.
4.50/5 (4 votes)
23 Nov 2011CPOL1 min read 13.3K   2   1
ServiceConfiguration

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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect
India India
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

Comments and Discussions

 
GeneralMy vote of 1 Pin
VMAtm9-Dec-11 1:06
VMAtm9-Dec-11 1:06 
Too general info

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.