Επεξεργασία

Κοινή χρήση μέσω


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(System::String ^ filename);
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);
static member Configure : string -> unit
[<System.Obsolete("Use System.Runtime.Remoting.RemotingConfiguration.Configure(string fileName, bool ensureSecurity) instead.", false)>]
static member Configure : string -> unit
Public Shared Sub Configure (filename As String)

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" );

// Configure the remoting structure.
RemotingConfiguration.Configure("server.config");
' 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

Configure(String, Boolean)

Reads the configuration file and configures the remoting infrastructure.

public:
 static void Configure(System::String ^ filename, bool ensureSecurity);
public static void Configure (string filename, bool ensureSecurity);
static member Configure : string * bool -> unit
Public Shared Sub Configure (filename As String, ensureSecurity As Boolean)

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