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

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 ...

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