11.14. Make an Object Remotable

Problem

You need to create a class that can be accessed from another application or another computer on the network. However, you don't need cross-platform compatibility, and you want optimum performance.

Solution

Make the class remotable by deriving from System.MarshalByRefObject, and create a component host that registers the class with the .NET remoting infrastructure.

How It Works

Remoting allows you to make an object accessible across process and machine boundaries. Although web services are ideal when you need to share functionality across platforms or trust boundaries, remoting is one of the best-performing choices for a closed system in which all components are built on .NET and the Windows operating system. ...

Get Visual Basic 2008 Recipes: A Problem-Solution Approach 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.