NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Remoting Configuration Reference

RemotingServices.ConfigureRemoting Reference

namespace System.Runtime.Remoting
{
  public class RemotingServices
  {
    public static void ConfigureRemoting(String fileName);
  }
}

ConfigureRemoting.

Read the configuration file and configure Remoting.

Remoting Configuration File Format

Assembly or Type

An Assembly or a type within can live in a remote application with respect to the current application.

Entity Description Example
RemoteApplication The Application Name MyRemoteApp1

Type

Entity Description Example
URI If the URI is specified then Connect is used to obtain a proxy to a wellknown object when a new class is instanciated e.g “new SomeClass”.

If a full URI (e.g. http://. . . ) is specified it is used, otherwise it is assumed the URI is relative to the URI for the Remote Application.

MyFoo=http://somehost/foo.soap

or

MyFoo=foo.soap

Remote Application Configuration

Applications can be remote with respect to the current application.

Entity Description Example
RemoteApplicationName The Application Name My401k
RemoteApplicationURI The Application URI http://www.contoso.com/My401k

Well Known Object (WKO) Configuration

Well Known objects can be published by an Application.

Entity Description Example
FulllTypeName The full type name. MyNamespace.MyType
AssemblyName The Assembly Name MyNamespace
ObjectURI The Object URI on which to publish the object. foo.soap
ObjectMode SingleCall

Singleton

SingleCall

Export

Export objects can be client activated.

Entity Description Example
AssemblyName The Assembly Name MyNamespace
FulllTypeName The full type name. MyNamespace.MyType

Channel Configuration

An Application registers channels.

Entity Description Example
ChannelFullTypeName The channel type name System.Remoting.Channels.TCP.TCPChannel
mimeType The mime type the channel uses to encode messages. This specified in the Name=Value section for the channel. text/soap

or

bin/bin

Transport specific Items

TCP Channel Configuration

Entity Description Example
ChannelTypeName The channel type name System.Remoting.Channels.TCP.TCPChannel
Ports TCP Ports to listen on 9090;9898
mimeType The mime type the channel uses to encode messages. This specified in the Name=Value section for the channel. text/soap

or

bin/bin

HTTP Channel Configuration

Entity Description Example
ChannelTypeName The channel type name System.Remoting.Channels.HTTP.HTTPChannel
Ports TCP Ports to listen on 8080;8081
Listener Specified that another component is listening and dispatches HTTP messages into the HTTP Channel ASPPlus
mimeType The mime type the channel uses to encode messages. This specified in the Name=Value section for the channel. text/soap

or

bin/bin

Lifetime

An Application registers channels.

Entity Description Example
LeaseTime The default lease time for the application in seconds 600
RenewOnCallTime The default renew on call call time for the application in seconds. 120
SponsorshipTimeout The default sponsorship timeout for the application in seconds. 120
LeaseManagerPollTime The default lease manager poll time for the application in seconds. 10

Remoting Configuration File Format

For PDC Remoting Configuration uses a compact file format.

--- Comments ------------------------------------------------------------------
- Comment lines begin with a “-“
--- Application Section  ------------------------------------------------------
Name#[ApplicationName]
--- Assembly Section  ---------------------------------------------------------
Assembly#[AssemblyName]#[RemoteApplicationName]#[FullTypeName[=URI]][;...] 
--- RemoteApplication Section  ------------------------------------------------
RemoteApplication#[RemoteApplicationName]#[RemoteApplicationURI]
--- Channel Section  ----------------------------------------------------------
- Channel##[ChannelFullTypeName]#[Name=Value;Name=Value]
--- WellKnown Section --------------------------------------------------------
WellKnownObject#[FullTypeName]#[AssemblyName]#[ObjectURI]#[ObjectMode]
--- Export Section -----------------------------------------------------------
- These types can be client activated
Export#[AssemblyName]#[FullTypeName][;...]
--- Lifetime Section ---------------------------------------------------------
Lifetime#[Name=value;Name=value;Name=value]
--- End ----------------------------------------------------------------------

For Post PDC Remoting Configuration will be integrated into the standard XML Application Configuration file.

An application configuration file is an XML document that contains sections for various feature areas. The general format is a follows:

Application
   Feature+
      Feature Items*
      SubFeature*
         Sub feature items+

Example

<Application name="My401kApp">
   <aspplus:ASPPLUS xmlns:aspplus="http://www.microsoft.com/aspplus">
    . . .
   </aspplus:ASPPLUS>

   <urt:FusionBindings xmlns:urt="http://www.microsoft.com/urt">
   . . .
   </urt:FusionBindings>

  <urt:Assemblies xmlns:urt="http://www.microsoft.com/urt">
    <Assembly name="Calculator" version="5.0.0.0">
    <Assembly name="401kWizard" version="*">
    <Assembly name="401kTax" RemoteApplication="MyRemoteApp1" version="*">
        <Type name=EmployeePayrollRecord />
        <Type name=GovTaxRateTable URI=”GovTaxRateTable”/>
    </Assembly>
    <Assembly name="401kUtils" version="*">
      <Type name=Employee RemoteApplication="MyRemoteApp2"/>
      <Type name=Customer RemoteApplication="MyRemoteApp3"/>
    </Assembly>
    . . .
  </urt:Assembly>

  <urt:Remoting xmlns:urt="http://www.microsoft.com/urt">
    <RemoteApplications>
      <MyRemoteApp1>
          <RemoteApplicationName>My401ktax</RemoteApplicationName >
          <RemoteApplicationURI>
                      http://secure.hr.microsoft.com/My401ktax"
         </RemoteApplicationURI >
      </MyRemoteApp1>
      <MyRemoteApp2>
          <RemoteApplicationName> My401kEmployee"</ RemoteApplicationName >
          <RemoteApplicationURI>
                         http://host.microsoft.com/My401kEmployee"
          </RemoteApplicationURI >
      </MyRemoteApp2>
      <MyRemoteApp3>
          <RemoteApplicationName>My401kCustomer"</RemoteApplicationName>
          <RemoteApplicationURI>http://host.microsoft.com/My401kCustomer"</URI>
      </MyRemoteApp3>
    </RemoteApplications>

   <WellKnownObjects>
     <WellKnownObject>
        <FullTypeName>MyPackage.MyType1</FullTypeName >
       <AssemblyName> MyAssembly </AssemblyName>
       <ObjectURI> MyURIForMyType1 </ObjectURI>
      <ObjectMode> SingleCall </ObjectMode>
     </WellKnownObject>
     <WellKnownObject
       <FullTypeName> MyPackage.MyType2 </FullTypeName>
       <AssemblyName> MyAssembly </MyAssemblyName>
       <ObjectURI> MyURIForMyType2 </ObjectURI>
      <ObjectMode> Singleton </ObjectMode>
     </WellKnownObject>

   <Exports>
     <Export>
      <AssemblyName> MyNamespace </AssemblyName>
        <FullTypeName>MyPackage.MyType1</FullTypeName>
     </Export>
     <Export>
      <AssemblyName> MyNamespace </AssemblyName>
        <FullTypeName>MyPackage.MyType2</FullTypeName>
     </Export>
   </Exports>
   <Channels>
     <TCPChannel>
         <ChannelFullTypeName>
                 System.Remoting.Channels.TCP.TCPChannel
         </ChannelFullTypeName>
        <Ports> 5480;5340 </Ports>
         <MimeType>bin/bin</MimeType>
     </TCPChannel>
     <HTTPChannel>
        <Ports> listener=”System.Remoting.Channels.HTTP.ASPX.HttpListener”> 80 </Port>
       <Listener> ASPPlus</Listenen>
        <MimeType>text/xml</MimeType>
     </HTTPChannel>
    </Channels>
  </urt:Remoting>
</Application>