Compartir a través de


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

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

Attributes and Elements

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

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 Framework 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.

Parent Elements

Element Description

application

Contains information about remote objects the application consumes and exposes.

configuration

The root element in every configuration file used by the common language runtime and .NET Framework applications.

system.runtime.remoting

Contains information about remote objects and channels.

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 Framework 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>

See Also

Reference

Remoting Settings Schema
<client>

Concepts

Activation of Remote Objects