Partager via


<client> Element

Contains objects the application consumes. Because the url attribute is required for client-activated types, but not for server-activated types, each unique URL will have its own <client> element containing the client-activated types published at that location.

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

<client 
   url="url" 
   displayName="displayName"
/>

Optional and Required Attributes

Attribute Description
url This attribute is optional if the remote types are all server-activated types; however, it is required if any remote types are client-activated.
displayName Used by the .NET Framework Configuration Tool to create a list of client applications. The .NET Remoting system does not use this attribute.

Child Elements

Element Description
<wellknown> Contains information about server-activated (well-known) objects the application wants to consume. Can occur one or more times in the <client> element.
<activated> Contains information about client-activated objects the application wants to consume. Can occur one or more times in the <client> element.

Example

The following configuration file declares a server-activated (well-known) 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>
            <wellknown 
               type="RemoteType, RemoteAssembly"
               url="http://computername:8080/RemoteType.rem"
            />
         </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