This documentation is archived and is not being maintained.

AppDomainSetup.SetConfigurationBytes Method

Provides XML configuration information for the application domain, overriding the application's XML configuration information.

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

public void SetConfigurationBytes(
	byte[] value
)

Parameters

value
Type: System.Byte[]

A Byte array containing the XML configuration information to be used for the application domain.

The SetConfigurationBytes method provides a way to override the configuration information of an application that creates a new application domain. The configuration file information in value overrides the configuration file information for the application. For example, when the Example.exe application creates a new application domain, it can override the configuration information originally obtained from the Example.exe.config file.

Important noteImportant Note:

Some consumers of configuration file information do not use the information stored by the SetConfigurationBytes method. The runtime does not enforce this. To ensure that all configuration file information is overridden in a new application domain, use the ConfigurationFile property to specify a configuration file. The SetConfigurationBytes method does affect assembly binding.

The XML in value is the same as the XML in a normal configuration file, except that it is stored as a Byte array.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0
Show: