WebConfigurationManager.OpenMappedMachineConfiguration Method

Definition

Opens the machine-configuration file as a Configuration object to allow read or write operations.

Overloads

OpenMappedMachineConfiguration(ConfigurationFileMap, String)

Opens the machine-configuration file as a Configuration object using the specified file mapping and location to allow read or write operations.

OpenMappedMachineConfiguration(ConfigurationFileMap)

Opens the machine-configuration file as a Configuration object, using the specified file mapping to allow read or write operations.

OpenMappedMachineConfiguration(ConfigurationFileMap, String)

Opens the machine-configuration file as a Configuration object using the specified file mapping and location to allow read or write operations.

C#
public static System.Configuration.Configuration OpenMappedMachineConfiguration(System.Configuration.ConfigurationFileMap fileMap, string locationSubPath);

Parameters

fileMap
ConfigurationFileMap

The ConfigurationFileMap object to use in place of a default machine-configuration file.

locationSubPath
String

The specific resource to which the configuration applies.

Returns

A Configuration object.

Exceptions

A valid configuration file could not be loaded.

See also

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

OpenMappedMachineConfiguration(ConfigurationFileMap)

Opens the machine-configuration file as a Configuration object, using the specified file mapping to allow read or write operations.

C#
public static System.Configuration.Configuration OpenMappedMachineConfiguration(System.Configuration.ConfigurationFileMap fileMap);

Parameters

fileMap
ConfigurationFileMap

The ConfigurationFileMap object to use in place of the default machine-configuration file.

Returns

A Configuration object.

Exceptions

A valid configuration file could not be loaded.

See also

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1