O'Reilly logo

Microsoft® Visual Basic® .NET Programmer's Cookbook by Matthew MacDonald

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

Access a Remote Object Through an Interface

Problem

You want a client to be able to create a remote object without requiring a reference to the assembly that defines it.

Solution

Create an interface that defines the methods the client needs to access, and distribute an assembly that contains only the interface.

Discussion

One of the limitations with .NET Remoting is that the client needs a local copy of the assembly with the code for the remote object in order to determine what methods are available. This not only poses an additional distribution headache, but it also can compromise security if you don’t want the client to be able to examine the code or create local instances of the classes it contains.

The solution is to create an interface that declares ...

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