Kris Krause .NET Meister

"If it is fast and ugly, they will use it and curse you; if it is slow, they will not use it."
- David Cheriton, The Art of Computer Systems Performance Analysis

Tuesday, January 18, 2005

.NET Remoting Events: Server to Client(s)

I ported Sathish's code from VB.NET to C#. Pretty straight forward. His article is located here. Download the updated source code here.

If you leave the application running for ten minutes... come back... and try to send a message via the EventPublisher... the client(s) do not receive the message. In order to prevent timeouts I forced an "infinite lease" in both Hoster.cs and EventsManager.cs:


public override object InitializeLifetimeService()
{
return null;
}

Labels:

4 Comments:

  • Thanks for porting this over to C#!

    By Anonymous Anonymous, at 1:42 PM  

  • I am getting the error that "no connection could be made because the target machine actively refused it."
    when deply the server and client on different machines

    Can you tell me what can i do for this?

    Thanks..

    By Anonymous Aparna, at 3:53 PM  

  • Greetings Kris,

    Would this work in the case of a Web Server firing an event on a client's desktop?

    Thanks much,
    Jerry

    By Anonymous Anonymous, at 6:17 PM  

  • Hey,

    The link to the updated C# code no longer works. Any idea where I can grab the C# version from?

    Thanks!

    By Blogger waterloomatt, at 8:27 AM  

Post a Comment

<< Home