WebConfigurationMap Constructors

Definition

Initializes a new instance of the WebConfigurationMap class.

Overloads

WebConfigurationMap()

Initializes a new instance of the WebConfigurationMap class by using the default path values for the Machine.Config and root Web.Config files.

WebConfigurationMap(String, String)

Initializes a new instance of the WebConfigurationMap class by using the specified path values for the Machine.config and root Web.config files.

Remarks

You can use the WebConfigurationMap class to provide configuration paths to methods such as Microsoft.Web.Administration.ServerManager.GetAdministrationConfiguration and Microsoft.Web.Administration.ServerManager.GetWebConfiguration.

A WebConfigurationManager object uses the default physical path values if a default (empty) WebConfigurationMap object is passed as a parameter to the WebConfigurationManager methods.

WebConfigurationMap()

Initializes a new instance of the WebConfigurationMap class by using the default path values for the Machine.Config and root Web.Config files.

public:
 WebConfigurationMap();
public WebConfigurationMap ();
Public Sub New ()

Remarks

A WebConfigurationManager object uses the default physical path values if a default (empty) WebConfigurationMap object is passed as a parameter to the WebConfigurationManager methods.

Applies to

WebConfigurationMap(String, String)

Initializes a new instance of the WebConfigurationMap class by using the specified path values for the Machine.config and root Web.config files.

public:
 WebConfigurationMap(System::String ^ machineConfigurationPath, System::String ^ rootWebConfigurationPath);
public WebConfigurationMap (string machineConfigurationPath, string rootWebConfigurationPath);
new Microsoft.Web.Administration.WebConfigurationMap : string * string -> Microsoft.Web.Administration.WebConfigurationMap
Public Sub New (machineConfigurationPath As String, rootWebConfigurationPath As String)

Parameters

machineConfigurationPath
String

The path of the Machine.config file.

rootWebConfigurationPath
String

The path of the root Web.config file.

Remarks

You can use this constructor to override the default configuration paths that IIS uses. You can pass a valid configuration file path or null to either or both parameters of this constructor.

Applies to