<client> Element
This topic is specific to a legacy technology that is retained for backward compatibility with existing applications and is not recommended for new development. Distributed applications should now be developed using the Windows Communication Foundation (WCF).
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. This element may occur in an application configuration file, machine configuration file.
Schema Hierarchy
<configuration>
<system.runtime.remoting> Element
<application> Element
<client> Element
Syntax
<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>