home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2005 June (DVD) / DPPRO0605DVD.iso / dotNETSDK / SETUP.EXE / netfxsd1.cab / Readme_htm_82________.3643236F_FC70_11D3_A536_0090278A1BB8 < prev    next >
Encoding:
Extensible Markup Language  |  2003-03-28  |  11.6 KB  |  145 lines

  1. ∩╗┐<?xml version="1.0" encoding="utf-8"?><root xmlns:dt="urn:schemas-microsoft-com:datatypes" xmlns:d2="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"><?xml-stylesheet type="text/xsl" href="..\..\..\..\readme.xsl"?><HTML><HEAD><TITLE> Remoting Hello Sample</TITLE><STYLE>
  2.     .Title{FONT-FAMILY: Verdana;FONT-SIZE: large;COLOR: #808080}
  3.     </STYLE><STYLE>
  4.     .Heading{FONT-FAMILY: Verdana;FONT-SIZE: large}
  5.     </STYLE><STYLE>
  6.     .SectionBreak{FONT-SIZE: small;MARGIN-BOTTOM: 2em}
  7.     </STYLE><STYLE>
  8.     .SmallBreak{FONT-SIZE: small;MARGIN-BOTTOM: 1.5em}
  9.     </STYLE><STYLE>
  10.     .Text{FONT-FAMILY: Verdana;FONT-SIZE: x-small}
  11.     </STYLE><STYLE>
  12.     .FixedHeading{FONT-FAMILY: Verdana;FONT-SIZE: x-small}
  13.     </STYLE><STYLE>
  14.     .FixedText{MARGIN-LEFT: 3ex;FONT-FAMILY: Lucida Console;FONT-SIZE: x-small;FONT-WEIGHT: Bold}
  15.     </STYLE><STYLE>
  16.     .ListSansBullets {list-style-type: none;FONT-FAMILY: Verdana;FONT-SIZE: x-small}
  17.     </STYLE></HEAD><BODY><table><tr><td><h2 class="Title"> Remoting Hello Sample</h2></td><td valign="baseline" class="Text">
  18.             ┬á┬á┬á
  19.               
  20.                   (Console Application)
  21.                 </td></tr></table><p class="Text">
  22.     This document contains the release information for the .NET Framework Hosting remote objects sample. You will find the following sections below: 
  23.     </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" />
  24.     Overview
  25.     </h4><p class="Text"> 
  26.     This sample shows how to build a simple service that
  27.     manipulates a string passed to it as a parameter and
  28.     return the result back to the caller.  It is important
  29.     to note that the service must be hosted before it can be
  30.     called by a client.  This can be achieved by compiling the
  31.     service as a DLL and registering the service in IIS or by
  32.     loading the service from the DLL using the console
  33.     application provided for this purpose.
  34.     </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
  35.     where the service will be loaded from.  For this sample we create
  36.     the bin subdirectory under RemotingHello and copy Hello.dll there.</li><p></p><li>Start Internet Services Manager and select Default Web Site
  37.     under the server node.  Select Action, New, Virtual Directory on the
  38.     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
  39.     path up to but excluding the bin directory where the dll in step 1
  40.     was copied to.  For example</li><p></p> 
  41.  
  42.       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
  43.     has now been registered and will appear under the list of Default Web Sites in the Internet Services
  44.     Manager window.</li><p></p><li>Check that there is a web.config file in the directory where the service was registered.  This
  45.     file describes our service and will automatically be loaded when a client attempts to access our
  46.     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
  47.     where the client will be loaded from.  For this sample we create
  48.     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
  49.     under the server node.  Select Action, New, Virtual Directory on the
  50.     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
  51.     path up to but excluding the bin directory where the dll in step 1
  52.     was copied to.  For example</li><p></p> 
  53.  
  54.       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
  55.     has now been registered and will appear under the list of Default Web Sites in the Internet Services
  56.     Manager window.</li><p></p><li>Check that there is a web.config file in the directory where the client was registered.  This
  57.     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">
  58.     This sample will only operate correctly on any version of Windows with the Common Language Runtime and Internet Information Server (IIS) installed.  
  59.     </p></span><p class="SectionBreak" /><h4 class="Heading"><a name="_Location_of_Sample" />
  60.     Location
  61.     </h4><p class="Text">
  62.     This sample is located in the <a href="." title="Jump to Folder" target="_blank">Technologies\Remoting\Basic\RemotingHello
  63.  
  64.     </a> subdirectory of the .NET Framework SDK samples directory.
  65.     </p><p class="FixedHeading">
  66.     For Example:
  67.       <p class="FixedText">
  68.       C:\Program Files\Microsoft.NET\SDK\v1.1\Samples\Technologies\Remoting\Basic\RemotingHello
  69.  
  70.     </p></p><p class="SmallBreak" /><p class="Text">
  71.       This sample contains the following directory structure:
  72.       
  73.       <ul><li class="ListSansBullets"><b>\bin</b> -- 
  74.      
  75.     Contains the Hello.dll required when the service is accessed using IIS.  The service should be registered with
  76.     IIS before calling this service from the clients in the Client/ConsoleClient, Client/ConsoleClientAll and
  77.     Client/RemotingHelloWebClient directories.
  78.     </li></ul><ul><li class="ListSansBullets"><b>\Service</b> -- 
  79.      
  80.     The source code for the HelloService and associated build.bat are stored here.  The build.bat file creates
  81.     Hello.dll and copies the file to the bin directory.
  82.     </li></ul><ul><li class="ListSansBullets"><b>\Service\DirectHostService</b> -- 
  83.      
  84.     The source code for hosting this service in a console application and associated build.bat.  The service
  85.     should be started by running runme.bat before calling the service from the clients in the Client/ConsoleClientDirect
  86.     directory.
  87.     </li></ul><ul><li class="ListSansBullets"><b>\Client</b> -- 
  88.      
  89.     Contains a buildall.bat to build all the clients in the subdirectories
  90.     </li></ul><ul><li class="ListSansBullets"><b>\Client\ConsoleClient</b> -- 
  91.      
  92.     Contains the HelloNew client and associated build.bat.  Hello.dll is copied from the bin directory
  93.     because the compiler needs to reference the metadata of the service when compiling the client.  The RemotingHello
  94.     service should be registered in IIS before running this client.
  95.     </li></ul><ul><li class="ListSansBullets"><b>\Client\ConsoleClientAll</b> -- 
  96.      
  97.     Contains the source files and associated build.bat files to build the following executables:
  98.     HelloAsync.exe, HelloAsync2.exe, HelloGetObj.exe. HelloGetObj2.exe, HelloNew.exe, HellowNew2.exe and
  99.     HelloNew3.exe.  Each executable has its own config file.  The RemotingHello service should be registered in
  100.     IIS before running these clients.
  101.     </li></ul><ul><li class="ListSansBullets"><b>\Client\ConsoleClientDirect</b> -- 
  102.      
  103.     Contains the source files and associated build.bat files to build the following executables:
  104.     HelloAsync.exe, HelloAsync2.exe, HelloGetObj.exe. HelloGetObj2.exe, HelloNew.exe, HellowNew2.exe and
  105.     HelloNew3.exe.  Each executable has its own config file.  The HelloService in Service/DirectHostService should
  106.     be running before running these clients.
  107.     </li></ul><ul><li class="ListSansBullets"><b>\Client\RemotingHelloWebClient</b> -- 
  108.      
  109.     Contains the config and the aspx files required to access the service from a web browser.
  110.     Please ensure that a HelloWebClient is registered with IIS at the directory samples\technologies\remoting\Basic\RemotingHello\Client\RemotingHelloWebClient.
  111.     For example<p></p>
  112.  
  113.       C:\Program Files\Microsoft.NET\SDK\v1.1\Samples\technologies\remoting\Basic\RemotingHello\Client\RemotingHelloWebClient
  114.     </li></ul></p><p class="SectionBreak" /><h4 class="Heading"><a name="_Building_the_Sample" />
  115.     Building the Sample
  116.     </h4><p class="Text">
  117.     In order to properly build and run this sample, the following steps need to be performed.
  118.     </p><p class="Text"> 
  119.     Type <b>BUILDALL.bat</b> from the command line.      
  120.     <p class="FixedHeading">
  121.   For Example:
  122.   </p><p class="FixedText"> 
  123.     C:\Program Files\Microsoft.NET\SDK\v1.1\Samples\Technologies\Remoting\Basic\RemotingHello> BUILDALL.bat
  124.     </p></p><p class="SectionBreak" /><h4 class="Heading"><a name="_Running_the_Sample" />
  125.     Running the Sample
  126.     </h4><p class="Text">
  127.     In order to run this sample, follow the instructions listed below.
  128.     </p><span class="Text"><ul class="Text"><li>
  129.     Ensure that the HelloService host is running (see DirectHostService above) and run all the executables
  130.     in Client/ConsoleClientDirect.
  131.     </li></ul><ul class="Text"><li>
  132.     Ensure that the HelloService is registered with IIS (see Registering the service in IIS above) and run all the
  133.     executables in the Client/ConsoleClient and Client/ConsoleClientAll directories.
  134.     </li></ul><ul class="Text"><li>
  135.     Ensure that the HelloWebClient is registered with IIS as described above and run
  136.     the sample from a browser by connecting to http://localhost/HelloWebClient
  137.     </li></ul></span><p class="SectionBreak" /><h4 class="Heading"><a name="_sdkvars" />
  138.     Notes
  139.     </h4><p class="Text">
  140.     For the .Net Framework samples to function properly, your Path, Include, and Lib environment variables must be set correctly. 
  141.     In many cases, the SDK install program updates these environment variables for you. However, if you installed the .Net Framework SDK 
  142.     using Visual Studio .NET, or unselected "register environment variables" during setup, these environment variables will not be updated. 
  143.     You can set the Path, Include and Lib environment variables by running SDKVars.bat, located in the <i><SDKRoot>\Bin</i> directory. 
  144.     SDKVars.bat must be executed in every command shell.
  145.     </p></BODY></HTML></root>