Sunday, June 3, 2012

When I create a new ASP.NET 4 web application, the web.config file is almost empty. What happened to all the configuration elements that were there prior to ASP.NET 4?

All the major configuration settings are moved into machine.config file, and all the applications will inherit the setting from this file. If an application needs to override the default settings, we can do so using the application specific configuration (web.config) file. ASP.NET 4 applications have clean web.config files.


If you create a new asp.net 4 empty web application, the only entry that you will find is shown below.




Note: If you create a new ASP.NET Web Application, instead of a new ASP.NET Empty Web Application, you will find a lot more confiuration entries in the web.config file. This is because, the template for ASP.NET web application overrides some of the default settings inherited from machine.config.

No comments:

Post a Comment