I am using Remoting (TCP) to access a singleton object in one app (a service)
from another app (call it app #2). Using the methods described in competent
literature, the server raises an event that is handled in app #2. The event
delegate is simple, like
"delegate void MyDelegate( MyEventArgs e );".
This works fine when both apps are on the same machine and when they are on
different machines.
Discovering the generic delegates in .NET 2, I rewrote the code to use
"System.EventHandler<MyEventArgs>" instead. According to what I've read,
this should essentially be equivalent to
"delegate void MyDelegate( object sender, MyEventArgs e);".
Since I really didn't need the "sender" info, I used null there when the
event is raised.
Now, the events do not get to app #2!!! When the service attempts to raise
the event, it gets an exception reporting that "Because of security controls,
System.Runtime.Remoting.ObjRef is not accessible." What is the generic
delegate doing that causes this?