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 / March 2008

Tip: Looking for answers? Try searching our database.

Client crashes when calling method in server

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JamesB - 12 Mar 2008 22:40 GMT
Hi,
Still working away on my remoting based client/server setup - new problem I
have is as follows:

My windows service (the "server" as far as remoting is concerned) has a
method that is called by a timer at certain intervals. This raises events
that the "client" (a Winforms app) receives and acts on. This works
absolutely fine. However, I want users to be able to manually kick off said
method whenever they want in addition to the timed ones, and this is where
the problem lies. I put a button on my forms app that calls the same method
in the server, but at the point within the method that the event is fired
back to the client, the client freezes. I assume this is because the method
it called on the server hasn't yet completed, so the two bits of
communication are somehow getting crossed and cocking things up... any
pointers?
JamesB - 12 Mar 2008 22:53 GMT
> Hi,
> Still working away on my remoting based client/server setup - new problem
[quoted text clipped - 11 lines]
> communication are somehow getting crossed and cocking things up... any
> pointers?

OK - half a solution - I can get around the client crashing by calling my
method:

Thread remotemethod = new Thread(new ThreadStart(remobj.method));
remotemethod.Start();

Now my events come back without killing the client - but, monitoring this in
task manager, my number of threads (and memory usage) go up each time. How
can I get rid of the thread afterwards?

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.