9:55 AM

mechine.config Vs Web.config

Posted by pradeep T

When you modify the settings in the Web.Config file, you do not need to restart the Web service for the modifications to take effect.. By default, the Web.Config file applies to all the pages in the current directory and its subdirectories.


You can use the tag to lock configuration settings in the Web.Config file so that they cannot be overridden by a Web.Config file located below it. You can use the allowOverride attribute to lock configuration settings. This attribute is especially valuable if you are hosting untrusted applications on your server.

There are number of important settings that can be stored in the configuration file. Here are some of the most frequently used configurations, stored conveniently inside Web.config file..

1. Database connections.

2. Session States

3. Error Handling (CustomError Page Settings.)

4. Security (Authentication modes)

The Machine.Config file, which specifies the settings that are global to a particular machine. This file is located at the following path:



\WINNT\Microsoft.NET\Framework\[Framework Version]\CONFIG\machine.config



As web.config file is used to configure one asp .net web application, same way Machine.config file is used to configure the application according to a particular machine. That is, configuration done in machine.config file is affected on any application that runs on a particular machine. Usually, this file is not altered and only web.config is used which configuring applications.

0 comments: