.NET Deployment Examples

The following three procedures are examples of less common deployment configurations and assume that, not only are the installations described in Configuring a .NET Environment in place, but that you are familiar with the standard deployment process.

The standard .NET Web service and remote task interface deployment processes are described in the following topics:

Example One: To host a remote object in a custom application

Client deployment is similar to the standard remote client deployment except that the remote object is not hosted in IIS and requires that you write your own application for hosting the remote interface.

  1. Copy <project_name>.dll, Interop.SCREENCONNECTORPROXYSERVICELib.dll, and Remote<project_name>Server.config, to the development or server computer.

  2. Modify the configuration file to reflect your host requirements; TCP port, protocol, lifetime, object URL, as needed.

  3. Call RemotingConfiguration.Configure ( ) in your custom application.

    This tells the remoting framework to listen for incoming requests for the remote factory component, which is a server-activated singleton that can create instances of the remote object.

  4. Modify the client configuration file to correspond with the server configuration file.

  5. Develop your client application as described in the standard deployment process, except use the RemoteTestFactory to get an instance of the remote object.

Example Two: To deploy a Web service client using .NET Web Service (remote client) to a remote object hosted in IIS

This example combines the standard .NET Web service deployment with the .NET remote object deployment process. In this example, the .NET Web service acts as a remote client for an interface hosted on another server. To implement this installation, you must install the Web service twice; once on the Web service computer, and again, on the host computer.

  1. Open the wwwroot\<project_name>\Web.config file on the Web service computer and remove the complete <system.runtime.remoting> section of the file, replacing it with the following XML code snippet:

    	<appSettings>
    		<add key="remote.configuration" value="Remote
    		<project_name>Client.config"/>
    	</appSettings>
    

    The remote.configuration value should be a relative path to the remoting configuration file.

  2. To configure the Web service to use remoting to forward Web service requests to the host server, modify the configuration file to point to the host server and to the correct virtual directory.

    Client applications reference the Web service to run stateless tasks via the host computer.

Example Three: To deploy a Web service client using .NET Web Service (remote client) to a remote object hosted in a custom application

This example is very similar to the second example, except the remote .NET object is not hosted in IIS and requires that you write your own application for hosting the remote interface.

  1. Copy <project_name>.dll, Interop.SCREENCONNECTORPROXYSERVICELib.dll, and Remote<project_name>Server.config, to the host computer.

  2. Modify the configuration file to reflect your host requirements; TCP port, protocol, lifetime, object URL, as needed.

  3. Call RemotingConfiguration.Configure ( ) in your custom application.

    This tells the remoting framework to listen for incoming requests for the remote factory component, which is a server-activated singleton that can create instances of the remote object.

  4. Open the wwwroot\<project_name>\Web.config file on the Web service computer and remove the complete <system.runtime.remoting> section of the file, replacing it with the following XML code snippet:

    	<appSettings>
    		<add key="remote.configuration" value="Remote
    		<project_name> Client.config"/>
    	</appSettings>
    

    The remote.configuration value should be a relative path to the remoting configuration file.

  5. Modify the client configuration file to correspond with the server configuration file.

    The Web service should now use remoting to forward Web service requests to the custom application on the host server. Client applications reference the Web service WSDL file on the Web service computer to run stateless tasks via the custom application on the host machine.

Related Topics
Bullet Using .NET, Overview
Bullet Configuring a .NET Environment
Bullet Deploying Web Services Using .NET
Bullet Deploying a .NET Remote Client Object
  Attachmate