WebConfigurationFileMap Constructor (String)

.NET Framework (current version)
 

Initializes a new instance of the WebConfigurationFileMap class by using the specified machine configuration file name.

Namespace:   System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)

new : 
        machineConfigFileName:string -> WebConfigurationFileMap

Parameters

machineConfigFileName
Type: System.String

The machine configuration file name with the complete physical path (for example, c:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config).

You use this constructor when you are targeting a version of the .NET Framework that is earlier than the latest one that is installed on the computer. The method enables you to specify a machine configuration file that is appropriate to the version of the .NET Framework that you are targeting.

System_CAPS_noteNote

Even though the constructor only accepts the path to the Machine.config file, the configuration system will also read the root Web.config file in the same directory where the Machine.config file exists.

.NET Framework
Available since 4.0
Return to top
Show: