Share via


<application> 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 information about remote objects that the application consumes and exposes. This element may occur in an application configuration file, machine configuration file.

Schema Hierarchy

<configuration>
  <system.runtime.remoting> Element
    <application> Element

Syntax

<application name="AppName"> 
   <lifetime/> 
   <channels/> 
   <service/> 
   <client/> 
   <soapInterop/> 
</application>

Attributes and Elements

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

Attributes

Attribute Description

name

Optional attribute.

Names the application. You cannot use this attribute when hosting a remote type in Internet Information Services (IIS). In other hosting scenarios, the name becomes a part of the activation URL. For details, see Activation URLs.

Child Elements

Element Description

<lifetime>

Contains information about the lifetime of all remotable objects. Can occur once in the <application> element.

<service>

Contains objects the application exposes. Can occur one or more times in the <application> element.

<client>

Contains objects the application consumes. Can occur one or more times in the <application> element.

<channels>

Contains channels that the application uses to communicate with remote objects. Can occur once in the <application> element.

<soapInterop>

Contains type mappings used with SOAP. Can occur once in the <application> element.

Parent Elements

Element Description

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 lifetime information for all remote types hosted by a server application domain, declares for publication a server-activated (well-known) remote type, specifies that the default HttpChannel should listen on port 8080, and indicates that the .NET Framework remoting system should load all specified types (in this case, both the HttpChannel and the ServerActivatedType) when the host application starts.

<configuration>
   <system.runtime.remoting>
      <application>
         <lifetime
            leaseTime="10S"
            sponsorshipTimeout="0S"
            renewOnCallTime="5S"
            leaseManagerPollTime="5S"
         />
         <service>
            <wellknown 
               type="ServerActivatedType, RemoteAssembly" 
               objectUri="ServerType.rem" 
               mode="Singleton" 
            />
         </service>
      <channels>
         <channel port="8080" ref="http"/>
      </channels>
      </application>
      <debug loadTypes="true"/>
   </system.runtime.remoting>
</configuration>

See Also

Reference

Remoting Settings Schema

Concepts

Remote Object Configuration

Copyright © 2007 by Microsoft Corporation. All rights reserved.