共用方式為


<activated> Element (Client Instance)

Contains client-activated objects a client application consumes. The <client> element must have a url attribute specified if there is an <activated> element specified, or an exception will be thrown.

<configuration>
   <system.runtime.remoting>
      <application>
         <client>
            <activated>

<activated 
   type="type,assembly"
/>

Required Attributes

Attribute Description
type Specifies the full type name of the object and the name of the assembly that contains the type implementation. This includes version, culture, and public key information if the containing assembly is in the global assembly cache.

Example

The following configuration file declares a client-activated remote type for consumption and specifies that the client application should use the HttpChannel but allow the .NET Remoting system to find an appropriate port on the client's behalf.

<configuration>
   <system.runtime.remoting>
      <application>
         <client 
            url="http://computername:8080"
         />
            <activated
               type="RemoteType, RemoteAssembly"
            />
         </client>
         <channels>
            <channel 
               ref="http" 
               port="0"/>
         </channels>
      </application>
   </system.runtime.remoting>
</configuration>

Requirements

Configuration Files: Application configuration file, machine configuration file (Machine.config)

See Also

Remoting Settings Schema | Client Activation