Calling a Remote Service

Let’s see what a client must do to call a method on a remote object. To begin, add a project reference to the assembly that contains the remote object by right-clicking References in Solution Explorer, choosing Add Reference from the shortcut menu, and traversing the network to locate the target assembly. The project reference lets the client application know about the types defined in the assembly.

Note

Even if your remotable object is hosted by IIS, when you reference the assembly from a remoting client, choose the Add Reference option. The Add Web Reference command on the same shortcut menu is reserved for Web services and, more importantly, starts a completely different linking procedure. (More on this in Chapter ...

Get Applied XML Programming for Microsoft® .NET 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.