In Asp.net 4.0, new feature has came web.config refactoring, As per this feature, whenever we includes controls which requires config settings so in earlier version VS used to add those settings in to application config file.
In Web.config refactoring feature, everything goes in to machine.config file.
My Question are
- Is there any performance issue since all settings are moving in to Machine config?
- Unwanted settings also would be also be there since those settings are required for other apps but for my app those are not required.
ASP.NET 4 moved all boilerplate code to the machine config file. This helps in making your own web.config files easier to read. This doesn’t mean that your own settings should be moved to the machine.config. Custom settings that apply to your application should be in your web.config.
ASP.NET is smart in building the hierarchy of config files at runtime. It caches the files to make sure you don’t get any performance problems.
Only common settings are shared. Before ASP.NET 4 these settings needed to be added to each application.
Here is a blog by ScottGu that explains it in more detail: Clean web.config files