What is different between Web.Config and Machine.Config and Where it will be ?

Questions by charlesp

Showing Answers 1 - 10 of 10 Answers

harshaa

  • Aug 7th, 2006
 

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.

  Was this answer useful?  Yes

ss

  • Aug 17th, 2006
 

A web.config file is used to configure one asp .net web application. Each Asp.net application has a web.config file.

A Machine.config file is used to configure the applications in a particular machine. Configuration done in machine.config file is affected on any application that runs on a particular machine.

  Was this answer useful?  Yes

sirishagajula

  • Aug 26th, 2006
 

microsoft is providing default properties for web application with in a configuration file called machine.config.this file comes with .net framework installationc:winntmicrosoft.netv1.1.4322config-> machine.config.the developer can change properties(i.e, settings) for web application by providing a configuration file for the application called web.config

  Was this answer useful?  Yes

Amit Dube

  • Oct 23rd, 2006
 

web.config file apply setting to each web application while machine.config file apply setting to all ASP.NET application

  Was this answer useful?  Yes

swamy

  • Jan 5th, 2007
 

The ASP.NET Web.config file is used to define the configuration settings for an ASP.NET application. ASP.NET and the .NET Framework use .config files to define all configuration options. The .config files, including the ASP.NET Web.config file, are XML files. The ASP.NET application configuration settings can be changed by creating a file called Web.config and saving it in the root folder of the application.This is how the minimal Web.config file should look like:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
</system.web>
</configuration>

The first line of the Web.config file is the same as the first line for any .config file and specifies that this is an XML document with utf-8 character encoding type.
There are 2 important characteristics of the Web.config file. The first one is that if you change your Web.config file, you don?t need to re-compile your ASP.NET application.
The second one is that the Web.config file cannot be viewed in directly in a browser.

Server-wide configuration settings for the .NET Framework are defined in a file called Machine.config. The settings in the Machine.config file can be changed and those settings affect all .NET applications on the server.what if the Machine.config file defines different settings than the ones defined in your Web.config file? The  settings in the Web.config file override the settings in the Machine.config file.

  Was this answer useful?  Yes

Fahad

  • Aug 31st, 2007
 

web.config file apply setting to each web application while machine.config file apply setting to all ASP.NET application

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions