Web.config - What's new with IIS 7
Definition of Web.config files:
Web.config is a XML document that defines and maintains the configuration for an ASP.Net application. Web.config file is divided by tags that contain information specific to that particular section, be it, authorisation, authentication, custom errors, etc. These settings would go into < system.web>< /system.web>. Apart from this you can define your own application specific settings within < appsettings>< /appsettings > . A known example of this would be the use of database strings used within your ASP.Net application.
Therefore, the simplified web.config file will look like the one below:
< system.web>
< !— sections-->
< /system.web>
< appsettings>
< !— sections -->
< /appsettings >
< /configuration>
A web.config file is created at the root of your ASP.Net application, however, seperate web.config files can also be created at a virtual directory, on a lower level as well. These child web.config files will control the configuration settings of the virtual directory they are present in and the ones below them.
This was the scenario till IIS 6. With the improvement of the IIS 7 architecture(Integrated Pipeline) we now have the ability for better integration of ASP.NET and IIS 7. Therefore, developers and IIS administrators can configure IIS 7 settings from within the web.config file(Provided you have the necessary permissions). The new XML tag that contains all the configuration settings related to IIS 7 would go into < system.webserver>< /system.webserver>
For information on the configuration schema of .NET and IIS configuration schema take a look at these:
http://msdn.microsoft.com/en-us/library/dayb112d(VS.85).aspx
http://msdn.microsoft.com/en-us/library/ms689429.aspx