This documentation is archived and is not being maintained.

RemotingConfiguration.Configure Method (String, Boolean)

Reads the configuration file and configures the remoting infrastructure.

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

public static void Configure (
	string filename,
	bool ensureSecurity
public static void Configure (
	String filename, 
	boolean ensureSecurity
public static function Configure (
	filename : String, 
	ensureSecurity : boolean
Not applicable.



The name of the remoting configuration file. Can be a null reference (Nothing in Visual Basic).


true to enable security; otherwise, false.

Exception typeCondition


At least one of the callers higher in the callstack does not have permission to configure remoting types and channels.

Passing a null reference (Nothing in Visual Basic) as the filename parameter will cause default remoting initialization without requiring the existence of a configuration file.

For configuration file syntax, see Remoting Settings Schema.


Marshal-by-reference objects (MBRs) do not reside in memory forever. Instead, unless the type overrides MarshalByRefObject.InitializeLifetimeService to control its own lifetime policies, each MBR has a finite lifetime before the .NET Framework remoting system begins the process of deleting it and reclaiming the memory. For more information, see Lifetime Leases.

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

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0