Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Remoting / August 2005

Tip: Looking for answers? Try searching our database.

Remoting events GUI messagebox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gene Vangampelaere - 29 Aug 2005 14:47 GMT
I have a problem with my Remote Events. This is my situation:

I have a server application (windows service) that 'hosts' a remote object.
I have 1 or more client applications that are 'using' the remote object.
When the server fires an event the clients are recieving the event.
But here I have a problem. The event handler at the client is just showing a
messagebox. If there are more than 1 clientapplication then the messagebox
is shown one by one. First on clientapp1 (when you click OK) then on
clientapp2, ...

I want to show the messagebox at the same time on all the clientapps.

How can I do that ? Can someone explain me how this works ?

(you can find the code on :
http://www.codeproject.com/useritems/Remoting_Events.asp)

Thx in advance !

Gene
Roy Chastain - 29 Aug 2005 19:06 GMT
The remote event handlers are being called serially.  The way to fix this would be
1) - call each handler yourself by doing something like
            CAOEventHandler_String_delegate                        seh = null;
                foreach (Delegate seh_delegate in CAOEvent_String.GetInvocationList())
                {
                    try
                    {
                        seh = (CAOEventHandler_String_delegate)seh_delegate;
                        seh(event_string);
                    }
                    catch (Exception ex)
                    {
                        // Removing event handler because of error
                        CAOEvent_String -= seh;
                    }
                }

AND
2) - changing the call I have above to seh to an async remoting call.
  or the other #2
2) - make the code on the client side immediately change threads to do the actual work and that would let the server code
continue.
    (this is NOT the better choice)

>I have a problem with my Remote Events. This is my situation:
>
[quoted text clipped - 16 lines]
>
>Gene

-------------------------------------------
Roy Chastain
KMSYS Worldwide, Inc.
http://www.kmsys.com

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.