home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2005 June (DVD) / DPPRO0605DVD.iso / dotNETSDK / SETUP.EXE / netfxsd1.cab / readme_xml_69________.3643236F_FC70_11D3_A536_0090278A1BB8 < prev    next >
Encoding:
Extensible Markup Language  |  2002-06-19  |  7.8 KB  |  167 lines

  1. <?xml version='1.0'?> 
  2.     <?xml-stylesheet type="text/xsl" href="..\..\..\..\..\readme.xsl"?> 
  3.     <sample> 
  4.     <title> Remoting Hello Sample</title>
  5.     
  6.     <title-short>Hosting remote objects</title-short>
  7.     
  8.     <overview> 
  9.     This sample shows how to build a simple service that
  10.     manipulates a string passed to it as a parameter and
  11.     return the result back to the caller.  It is important
  12.     to note that the service must be hosted before it can be
  13.     called by a client.  This can be achieved by compiling the
  14.     service as a DLL and registering the service in IIS or by
  15.     loading the service from the DLL using the console
  16.     application provided for this purpose.
  17.     </overview>
  18.     
  19.     <subdirectory>Technologies\Remoting\VB\Basic\RemotingHello
  20.  
  21.     <directory name = "bin">
  22.     Contains the Hello.dll required when the service is accessed using IIS.  The service should be registered with
  23.     IIS before calling this service from the clients in the Client/ConsoleClient, Client/ConsoleClientAll and
  24.     Client/RemotingHelloWebClient directories.
  25.     </directory>
  26.     
  27.     <directory name = "Service">
  28.     The source code for the HelloService and associated build.bat are stored here.  The build.bat file creates
  29.     Hello.dll and copies the file to the bin directory.
  30.     </directory>
  31.  
  32.     <directory name = "Service\DirectHostService">
  33.     The source code for hosting this service in a console application and associated build.bat.  The service
  34.     should be started by running runme.bat before calling the service from the clients in the Client/ConsoleClientDirect
  35.     directory.
  36.     </directory>
  37.  
  38.     <directory name = "Client">
  39.     Contains a buildall.bat to build all the clients in the subdirectories
  40.     </directory>
  41.  
  42.     <directory name = "Client\ConsoleClient">
  43.     Contains the HelloNew client and associated build.bat.  Hello.dll is copied from the bin directory
  44.     because the compiler needs to reference the metadata of the service when compiling the client.  The RemotingHello
  45.     service should be registered in IIS before running this client.
  46.     </directory>
  47.  
  48.     <directory name = "Client\ConsoleClientAll">
  49.     Contains the source files and associated build.bat files to build the following executables:
  50.     HelloAsync.exe, HelloAsync2.exe, HelloGetObj.exe. HelloGetObj2.exe, HelloNew.exe, HellowNew2.exe and
  51.     HelloNew3.exe.  Each executable has its own config file.  The RemotingHello service should be registered in
  52.     IIS before running these clients.
  53.     </directory>
  54.  
  55.     <directory name = "Client\ConsoleClientDirect">
  56.     Contains the source files and associated build.bat files to build the following executables:
  57.     HelloAsync.exe, HelloAsync2.exe, HelloGetObj.exe. HelloGetObj2.exe, HelloNew.exe, HellowNew2.exe and
  58.     HelloNew3.exe.  Each executable has its own config file.  The HelloService in Service/DirectHostService should
  59.     be running before running these clients.
  60.     </directory>
  61.  
  62.     <directory name = "Client\RemotingHelloWebClient">
  63.     Contains the config and the aspx files required to access the service from a web browser.
  64.     Please ensure that a HelloWebClient is registered with IIS at the directory samples\technologies\remoting\VB\Basic\RemotingHello\Client\RemotingHelloWebClient.
  65.     For example<p></p>
  66.  
  67.       C:\Program Files\Microsoft.NET\SDK\v1.1\Samples\technologies\remoting\VB\Basic\RemotingHello\Client\RemotingHelloWebClient
  68.     </directory>
  69.     </subdirectory>
  70.     
  71.     <customsection  name = "Registering the service in IIS">
  72.     <li>Compile the service to a DLL and copy this DLL to a bin directory
  73.     where the service will be loaded from.  For this sample we create
  74.     the bin subdirectory under RemotingHello and copy Hello.dll there.</li><p></p>
  75.  
  76.     <li>Start Internet Services Manager and select Default Web Site
  77.     under the server node.  Select Action, New, Virtual Directory on the
  78.     menu and click Next to continue.</li><p></p> 
  79.  
  80.     <li>Enter RemotingHello as the alias and press Next</li><p></p> 
  81.  
  82.     <li>Enter the directory where the service is located.  Enter the full
  83.     path up to but excluding the bin directory where the dll in step 1
  84.     was copied to.  For example</li><p></p> 
  85.  
  86.       C:\Program Files\Microsoft.NET\SDK\v1.1\Samples\Technologies\Remoting\VB\Basic\RemotingHello<p></p> 
  87.  
  88.     <li>Press Next.  Accept the defaults presented and press Next again.  Press Finish.  The service
  89.     has now been registered and will appear under the list of Default Web Sites in the Internet Services
  90.     Manager window.</li><p></p> 
  91.  
  92.     <li>Check that there is a web.config file in the directory where the service was registered.  This
  93.     file describes our service and will automatically be loaded when a client attempts to access our
  94.     service with a browser or client using the HTTP channel on port 80.</li>
  95.     </customsection>
  96.     
  97.     <customsection  name = "Registering the web client in IIS">
  98.     <li>Compile the service to a DLL and copy this DLL to a bin directory
  99.     where the client will be loaded from.  For this sample we create
  100.     the bin subdirectory under RemotingHello\Client\RemotingHelloWebClient and copy Hello.dll there.</li><p></p>
  101.  
  102.     <li>Start Internet Services Manager and select Default Web Site
  103.     under the server node.  Select Action, New, Virtual Directory on the
  104.     menu and click Next to continue.</li><p></p> 
  105.  
  106.     <li>Enter HelloWebClient as the alias and press Next</li><p></p> 
  107.  
  108.     <li>Enter the directory where the service is located.  Enter the full
  109.     path up to but excluding the bin directory where the dll in step 1
  110.     was copied to.  For example</li><p></p> 
  111.  
  112.       C:\Program Files\Microsoft.NET\SDK\v1.1\Samples\Technologies\Remoting\VB\Basic\RemotingHello\Client\RemotingHelloWebClient<p></p> 
  113.  
  114.     <li>Press Next.  Accept the defaults presented and press Next again.  Press Finish.  The service
  115.     has now been registered and will appear under the list of Default Web Sites in the Internet Services
  116.     Manager window.</li><p></p> 
  117.  
  118.     <li>Check that there is a web.config file in the directory where the client was registered.  This
  119.     file describes our client and will automatically be loaded when the page is loaded.</li>
  120.     </customsection>
  121.     
  122.     <customsection  name = "Hosting the service in a console application">
  123.     <li>Copy the service dll to the same directory as the hosting executable</li><p></p>
  124.     <li>Create a configuration file that describes the service and channels we intend using</li><p></p> 
  125.     <li>Call RemotingConfiguration.Configure to register the config file</li><p></p> 
  126.     <li>Pause the application to prevent it from quitting</li>
  127.     </customsection>
  128.     
  129.     <customsection  name = "Requirements">
  130.     This sample will only operate correctly on any version of Windows with the Common Language Runtime and Internet Information Server (IIS) installed.  
  131.     </customsection>
  132.  
  133.     <buildsteps> 
  134.     <step> 
  135.     Type <b>BUILDALL.bat</b> from the command line.      
  136.     <example> 
  137.     C:\Program Files\Microsoft.NET\SDK\v1.1\Samples\Technologies\Remoting\VB\Basic\RemotingHello> BUILDALL.bat
  138.     </example>
  139.     </step>
  140.     </buildsteps>
  141.     
  142.     <runsteps> 
  143.     <step>
  144.     Ensure that the HelloService host is running (see DirectHostService above) and run all the executables
  145.     in Client/ConsoleClientDirect.
  146.     </step>
  147.  
  148.     <step>
  149.     Ensure that the HelloService is registered with IIS (see Registering the service in IIS above) and run all the
  150.     executables in the Client/ConsoleClient and Client/ConsoleClientAll directories.
  151.     </step>
  152.  
  153.     <step>
  154.     Ensure that the HelloWebClient is registered with IIS as described above and run
  155.     the sample from a browser by connecting to http://localhost/HelloWebClient
  156.     </step>
  157.     </runsteps>
  158.     
  159.     <keywords> 
  160.     <word name="Remoting" keyword="R"/>
  161.     <word name="Channels" keyword="C"/>
  162.     <word name="MBR" keyword="M"/>
  163.     </keywords>
  164.     </sample>
  165.  
  166.  
  167.