What is difference between machine.config and web.config file in Asp.Net?
Check out Best Alternative to InfoPath -> Try Now
Here in this post, we will discuss difference between machine.config file and web.config file in asp.net.
Also, you can check
Object-Oriented Programming (OOP) concepts in.Net
Machine.config:
– It gets created at the time of Visual Studio installation.
– There can be only one machine.config file exists in a server.
– This is only for machine level configuration like requestLimit, memoryLimit, ClientConnectedCheck etc.
Machine.config file located in below location:
\WINNT\Microsoft.NET\Framework\[Framework Version]\CONFIG\machine.config
Example:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config
Web.config:
– This got created when you create a web application project.
– This contains information for the application level. And this file inherits setting from the Machine.config file.
– we can store information like Database connection string, session details etc in web.config file.
Some points to remember:
– The settings made in the Web.config file are applied to that particular web application only whereas the settings of Machine.config file are applied to the whole asp.net application.
– web.config file inherits settings from machine.config file.

SharePoint Online FREE Training
JOIN a FREE SharePoint Video Course (3 Part Video Series)