IIS and Remoting

As shown in the previous sections, the remote object must be hosted by some server application. Listing 39.5 showed the code necessary to build a bare-bones hosting application. That was fairly simple, but an application has already been written that can do this for you. Internet Information Services (IIS) is an application that comes with Windows and is quite capable of hosting the remote object for you with minor changes to the application. The first change is that you must tell IIS where your object is located and how to host the remote object. You accomplish this through the use of a virtual directory and web.config file. To better illustrate this, follow these steps:

1.
Create a directory called SampleService in the Inetpub\wwwroot ...

Get Microsoft® Visual C#® .NET 2003 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.