what is the benefits of XML based configuration file ?

Posted by  Lee Patric
 135  View(s)
Ratings:
Rate this:

Give me the detailed description of XML based configuration file along with what web.config file contains and how it looks.

  1. Re: what is the benefits of XML based configuration file ?

    Benefits of XML-based Configuration files

    •  ASP.NET Configuration systems are extensible and application specific information can be stored and retrieved easily. It is a human readable file.
    •  We need not restart the web server when the settings are changed in configuration file. In ASP.NET automatically detects the changes and automatically applies them to the running ASP.NET application.
    • We can use any standard text editor or XML parser to create and edit ASP.NET configuration files. 

    What Web.config file contains?

    There are many number of important settings that can be stored in the configuration file. Some of the most frequently used configurations files which are stored conveniently inside Web.config file are: 

    •   Database connections 
    • Caching settings
    •  Session States
    •  Error Handling
    • Security 

    Configuration file looks like this

    1.	<configuration>  
    
    2. <connectionStrings>
    3. <add name="myCon" connectionString="server=MyServer;database=puran;uid=puranmehra;pwd=mydata1223" />
    4. </connectionStrings>
    5. </configuration/>

Answer