What is difference between machine.config and web.config file in Asp.Net?

InfoPath alternatives for form designing SharePoint

Here in this post, we will discuss difference between machine.config file and web.config file in asp.net.

Also, you can check

Exception handling in C#.Net

Object-Oriented Programming (OOP) concepts in.Net

Array and ArrayList in C#.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.


You May Also like the Following SharePoint Online Tutorials:

About Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SharePointSky.com

View all posts by Bijay Kumar →

Leave a Reply