Configure Method (String, Boolean)
Collapse the table of content
Expand the table of content

RemotingConfiguration.Configure Method (String, Boolean)

Note: This method is new in the .NET Framework version 2.0.

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



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 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 .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions

© 2016 Microsoft