Muokkaa

Jaa


<PreferComInsteadOfManagedRemoting> Element

Specifies whether the runtime will use COM interop instead of remoting for all calls across application domain boundaries.

<configuration>
  <runtime>
    <PreferComInsteadOfManagedRemoting>

Syntax

<PreferComInsteadOfManagedRemoting enabled="true|false"/>  

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description
enabled Required attribute.

Indicates whether the runtime will use COM interop instead of remoting across application domain boundaries.

enabled Attribute

Value Description
false The runtime will use remoting across application domain boundaries. This is the default.
true The runtime will use COM interop across application domain boundaries.

Child Elements

None.

Parent Elements

Element Description
configuration The root element in every configuration file used by the common language runtime and .NET Framework applications.
runtime Contains information about assembly binding and garbage collection.

Remarks

When you set the enabled attribute to true, the runtime behaves as follows:

These two behaviors ensure that all calls over COM interfaces between managed objects across application domain boundaries use COM and COM interop instead of remoting.

Example

The following example shows how to specify that the runtime should use COM interop across isolation boundaries:

<configuration>  
  <runtime>  
    <PreferComInsteadOfManagedRemoting enabled="true"/>  
  </runtime>  
</configuration>  

See also