O'Reilly logo

Object-Oriented Programming with Visual Basic .NET by J.P. Hamilton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

9.2. A Remotable Object

This chapter discusses two methods of hosting remote objects. The first method is Windows Services, which are background processes that lack a user interface. They are started either manually or automatically when Windows first loads. They are ideal for hosting remote objects because they do not interfere with other users on the machine. All interaction with services is done through the Service Control Manager (SCM), as shown in Figure 9-1. This program is run from the Administrative Tools directory in the Control Panel and is simply called "Services." Typically, Windows Services can be started, stopped, and paused from within the SCM. When these actions occur, a corresponding method within the service is called, allowing reciprocating action to occur.

Figure 9-1. Service Control Manager

The second method involves the use of an Internet Information Server (IIS) to host remotable objects. The advantages of this method are that no code is required and it only takes a few moments to configure. However, the configuration options are limited, compared to what can be done with a Windows Service, and the only available channel is HttpChannel. Windows Services can also use TcpChannel, which is considerably faster.

A remotable object is an essential ingredient for hosting a remote object. Example 9-1 contains a remotable version of the ServerInfo class from ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required