Fire an Event over a Remoting Channel
Problem
You need to create a client that can receive an event fired by a remote object.
Solution
Make sure you are using bidirectional channels. Create a remotable object on the client side that can receive the event from the server.
Discussion
Although the event-handling syntax doesn’t change when you use .NET Remoting, it takes additional steps to create a client that can handle an event from a remote object. There are three key requirements:
The remotable class must use client-activated or singleton activation mode (not single-call). This ensures that the object remains alive in between method calls, allowing it to fire an event to the client.
The client must use a bidirectional channel so that it can receive ...
Get Microsoft® Visual Basic® .NET Programmer's Cookbook 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.