difference between web.config file and machine.config file
Loading
difference between web.config file and machine.config file
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Vishal YelveRank #178 · 13.6K reputationPosted Apr 24, 2024, 9:15 AM EDT
Hi Kishan,
do refer below article
https://www.c-sharpcorner.com/UploadFile/8a67c0/web-config-vs-app-config-vs-machine-config/
https://www.c-sharpcorner.com/blogs/difference-between-webconfig-and-machineconfig-file1
Naimish MakwanaRank #324 · 7.7K reputationPosted Apr 25, 2024, 2:18 AM EDT
The
web.configandmachine.configfiles are both configuration files used in .NET applications. They store configuration data in XML format, but they serve different purposes and have different scopes1234:web.config: This file specifies configuration settings for a particular web application and is located in the application’s root directory1. It can contain application-level configuration settings2. Each web application can have its own
web.configfile, and directories inside a web application can also haveweb.configfiles1. The settings inweb.configfiles are applied to that particular web application only3. These files are parsed at runtime, which means if you make any changes, the web application will load all the settings in the config file2.machine.config: This file specifies configuration settings for all of the websites on the web server1. It is located in
$WINDOWSDIR$\Microsoft.Net\Framework\Version\Config1. Only onemachine.configfile exists on a system and it stores the highest level of configuration settings2. The settings ofmachine.configapply to all web applications residing on the server3. The settings inmachine.configcan be overridden byweb.configsettings2.In summary, the
machine.configfile contains settings that apply to all applications on a server, while theweb.configfile contains settings that apply to a specific web application. The settings in aweb.configfile can override the settings in themachine.configfile.Thanks