Share via


Machine Configuration Files

The machine configuration file, Machine.config, contains settings that apply to an entire computer. This file is located in the %runtime install path%\Config directory. Machine.config contains configuration settings for machine-wide assembly binding, built-in remoting channels, and ASP.NET.

The configuration system first looks in the machine configuration file for the <appSettings> element and other configuration sections that a developer might define. It then looks in the application configuration file. To keep the machine configuration file manageable, it is best to put these settings in the application configuration file. However, putting the settings in the machine configuration file can make your system more maintainable. For example, if you have a third-party component that both your client and server application uses, it is easier to put the settings for that component in one place. In this case, the machine configuration file is the appropriate place for the settings, so you don't have the same settings in two different files.

Note   Deploying an application using XCOPY will not copy the settings in the machine configuration file.

For details on how the common language runtime uses the machine configuration file for assembly binding, see How the Runtime Locates Assemblies.

See Also

Configuration Files | Configuration File Schema | Specifying an Assembly's Location | Redirecting Assembly Versions | ASP.NET Settings Schema