This document contains the release information for the .NET Framework Hosting remote objects sample. You will find the following sections below:
</p><ul class="Text"><li><a href="#_Sample_Overview">Overview</a></li><li><a HREF="#Registering the service in IIS">Registering the service in IIS</a></li><li><a HREF="#Registering the web client in IIS">Registering the web client in IIS</a></li><li><a HREF="#Hosting the service in a console application">Hosting the service in a console application</a></li><li><a HREF="#Requirements">Requirements</a></li><li><a href="#_Location_of_Sample">Location</a></li><li><a href="#_Building_the_Sample">Building the sample</a></li><li><a href="#_Running_the_Sample">Running the sample</a></li><li><a href="#_sdkvars">Notes</a></li></ul><p class="SectionBreak" /><h4 class="Heading"><a name="_Sample_Overview" />
Overview
</h4><p class="Text">
This sample shows how to build a simple service that
manipulates a string passed to it as a parameter and
return the result back to the caller. It is important
to note that the service must be hosted before it can be
called by a client. This can be achieved by compiling the
service as a DLL and registering the service in IIS or by
loading the service from the DLL using the console
application provided for this purpose.
</p><p class="SectionBreak" /><p class="SectionBreak" /><h4 class="Heading"><a name="#Registering the service in IIS"></a>Registering the service in IIS</h4><span class="Text"><p class="Text"><li>Compile the service to a DLL and copy this DLL to a bin directory
where the service will be loaded from. For this sample we create
the bin subdirectory under RemotingHello and copy Hello.dll there.</li><p></p><li>Start Internet Services Manager and select Default Web Site
under the server node. Select Action, New, Virtual Directory on the
menu and click Next to continue.</li><p></p><li>Enter RemotingHello as the alias and press Next</li><p></p><li>Enter the directory where the service is located. Enter the full
path up to but excluding the bin directory where the dll in step 1
was copied to. For example</li><p></p>
C:\Program Files\Microsoft.NET\SDK\v1.1\Samples\Technologies\Remoting\Basic\RemotingHello<p></p><li>Press Next. Accept the defaults presented and press Next again. Press Finish. The service
has now been registered and will appear under the list of Default Web Sites in the Internet Services
Manager window.</li><p></p><li>Check that there is a web.config file in the directory where the service was registered. This
file describes our service and will automatically be loaded when a client attempts to access our
service with a browser or client using the HTTP channel on port 80.</li></p></span><p class="SectionBreak" /><h4 class="Heading"><a name="#Registering the web client in IIS"></a>Registering the web client in IIS</h4><span class="Text"><p class="Text"><li>Compile the service to a DLL and copy this DLL to a bin directory
where the client will be loaded from. For this sample we create
the bin subdirectory under RemotingHello\Client\RemotingHelloWebClient and copy Hello.dll there.</li><p></p><li>Start Internet Services Manager and select Default Web Site
under the server node. Select Action, New, Virtual Directory on the
menu and click Next to continue.</li><p></p><li>Enter HelloWebClient as the alias and press Next</li><p></p><li>Enter the directory where the service is located. Enter the full
path up to but excluding the bin directory where the dll in step 1
was copied to. For example</li><p></p>
C:\Program Files\Microsoft.NET\SDK\v1.1\Samples\Technologies\Remoting\Basic\RemotingHello\Client\RemotingHelloWebClient<p></p><li>Press Next. Accept the defaults presented and press Next again. Press Finish. The service
has now been registered and will appear under the list of Default Web Sites in the Internet Services
Manager window.</li><p></p><li>Check that there is a web.config file in the directory where the client was registered. This
file describes our client and will automatically be loaded when the page is loaded.</li></p></span><p class="SectionBreak" /><h4 class="Heading"><a name="#Hosting the service in a console application"></a>Hosting the service in a console application</h4><span class="Text"><p class="Text"><li>Copy the service dll to the same directory as the hosting executable</li><p></p><li>Create a configuration file that describes the service and channels we intend using</li><p></p><li>Call RemotingConfiguration.Configure to register the config file</li><p></p><li>Pause the application to prevent it from quitting</li></p></span><p class="SectionBreak" /><h4 class="Heading"><a name="#Requirements"></a>Requirements</h4><span class="Text"><p class="Text">
This sample will only operate correctly on any version of Windows with the Common Language Runtime and Internet Information Server (IIS) installed.
Contains the config and the aspx files required to access the service from a web browser.
Please ensure that a HelloWebClient is registered with IIS at the directory samples\technologies\remoting\Basic\RemotingHello\Client\RemotingHelloWebClient.