RemotingConfiguration.Configure Method

Definition

Overloads

Configure(String)
Obsolete.

Reads the configuration file and configures the remoting infrastructure. Configure(String) is obsolete. Please use Configure(String, Boolean) instead.

Configure(String, Boolean)

Reads the configuration file and configures the remoting infrastructure.

Configure(String)

Caution

Use System.Runtime.Remoting.RemotingConfiguration.Configure(string fileName, bool ensureSecurity) instead.

Reads the configuration file and configures the remoting infrastructure. Configure(String) is obsolete. Please use Configure(String, Boolean) instead.

public static void Configure(string filename);
[System.Obsolete("Use System.Runtime.Remoting.RemotingConfiguration.Configure(string fileName, bool ensureSecurity) instead.", false)]
public static void Configure(string filename);

Parameters

filename
String

The name of the remoting configuration file. Can be null.

Attributes

Exceptions

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

Examples


// Configure the remoting structure.
RemotingConfiguration.Configure("server.config");

Remarks

Note

Configure(String) is obsolete. Please use Configure(String, Boolean) instead.

Passing null 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.

Note

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.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions (Obsolete)
.NET Framework 1.1 (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)

Configure(String, Boolean)

Reads the configuration file and configures the remoting infrastructure.

public static void Configure(string filename, bool ensureSecurity);

Parameters

filename
String

The name of the remoting configuration file. Can be null.

ensureSecurity
Boolean

If set to true security is required. If set to false, security is not required but still may be used.

Exceptions

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

Remarks

Passing null as the filename parameter will cause default remoting initialization without requiring the existence of a configuration file. For more information about remoting and security see Security in Remoting..

For configuration file syntax, see Remoting Settings Schema.

Note

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.

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