This documentation is archived and is not being maintained.

WebConfigurationFileMap Constructor (String)

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)

public:
WebConfigurationFileMap(
	String^ machineConfigFileName
)

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.

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

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: