This documentation is archived and is not being maintained.

ConfigurationUserLevel Enumeration

Used to specify which configuration file is to be represented by the Configuration object.

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

public enum class ConfigurationUserLevel

Member nameDescription
NoneGet the Configuration that applies to all users.
PerUserRoamingGet the roaming Configuration that applies to the current user.
PerUserRoamingAndLocalGet the local Configuration that applies to the current user.

Use ConfigurationUserLevel to specify which configuration file is to be represented by the Configuration object returned by ConfigurationManager::OpenExeConfiguration and WebConfigurationManager::OpenMachineConfiguration.

Application configuration files are in the same directory as the application and have the same name, but with a .config extension. For example, the configuration file for C:\System\Public.exe is C:\System\Public.exe.config.

Applications use a global configuration that applies to all users, separate configurations that apply to individual users, and configurations that apply to roaming users.

The following example shows how to use the ConfigurationUserLevel enumeration.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, 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: