<wellknown> Element (Service Instance)

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 information about server-activated (well-known) objects the application exposes to clients. This element may occur in an application configuration file, machine configuration file.

Schema Hierarchy

<configuration>
  <system.runtime.remoting> Element
    <application> Element
      <service> Element
        <wellknown> Element (Service Instance)

Syntax

<wellknown  
   mode="Singleton|SingleCall"
   displayName="name"
   type="type,assembly" 
      objectUri="objectUri" 
/>

Attributes and Elements

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

Attributes

Attribute Description

mode

Required attribute.

Indicates whether the object is a Singleton or SingleCall object. One option must be selected. For details, see Activation.

objectUrl

Required attribute.

Specifies the endpoint of the object's Uniform Resource Identifier (URI).

type

Required attribute.

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

displayName

Optional attribute.

Used by the .NET Framework Configuration Tool to create a list of server-activated objects this server is registered to publish. The .NET Framework remoting system does not use this attribute.

Child Elements

None.

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.

service

Contains objects the application exposes to other application domains or contexts.

system.runtime.remoting

Contains information about remote objects and channels.

Remarks

When an object is hosted in Internet Information Services (IIS), the objectUri extension must be .soap or .rem, so that the request is routed to the .NET Framework remoting IHttpHandler.

Example

The following configuration file declares a server-activated (well-known) type, the object URI at which it is to be found, and the WellKnownObjectMode that controls activation of instances.

<configuration>
   <system.runtime.remoting>
      <application>
         <service>
            <wellknown 
               type="ServerActivatedType, RemoteAssembly" 
               objectUri="ServerType.rem" 
               mode="Singleton" 
            />
         </service>
      </application>
   </system.runtime.remoting>
</configuration>

See Also

Reference

Remoting Settings Schema

Concepts

Activation of Remote Objects
Configuration of Remote Applications