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 / ASP.NET / Web Services / October 2007

Tip: Looking for answers? Try searching our database.

web service call locks up C# winforms application

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
chendricks - 22 Oct 2007 21:05 GMT
I have a C# winforms application that makes periodic web service calls in
background thread to my web service server. These calls work fine almost all
the time but on rare occassions the web service method call will never return
and the entire application will freeze, even though the call is being made on
its own background thread, not the main UI thread.

Does anyone know any reason why a particular web service method call would
cause my entire C# application to lock up and become unresponsive? Again,
this call is initiated on a background thread and this thread does not
interact with the main UI thread at all.

Thanks for any ideas,

Colin
John Saunders [MVP] - 23 Oct 2007 01:33 GMT
>I have a C# winforms application that makes periodic web service calls in
> background thread to my web service server. These calls work fine almost
[quoted text clipped - 9 lines]
> this call is initiated on a background thread and this thread does not
> interact with the main UI thread at all.

Obviously, there _is_ interaction with the UI thread. This interaction may
not be direct, but if there were no such interaction, I don't see how the UI
thread could freeze.

Does this happen when you run in the debugger? If so, can you break
execution when the freeze happens and use the Call Stack to find out where
the UI thread is blocking?
Signature

--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer

chendricks - 23 Oct 2007 15:28 GMT
I am unable to reproduce this at all either in the debugger or not. This
application runs on about 600 client machines and runs 24x7. The freeze
happens on about 1 machine about every other day.

My web service method is called "heartbeat" and all it does is let my server
know that the client is still alive. The client thread that calls the
heartbeat method does nothing else but call the method, then sleep for 5
minutes, then call it again. It's just a simple loop. It doesn't interact
with the main UI thread.

Other than manipulating a GUI control on the main UI thread, which I know is
bad, is there anything else related to WS calls that might freeze the
application?

Thanks for your help,

Colin

> >I have a C# winforms application that makes periodic web service calls in
> > background thread to my web service server. These calls work fine almost
[quoted text clipped - 17 lines]
> execution when the freeze happens and use the Call Stack to find out where
> the UI thread is blocking?
Andrew Faust - 30 Oct 2007 02:08 GMT
Does it share any resources that are used by other threads? Any variables,
database connections, files or any other resources that you are locking
while this task is processing? It sounds like you could have two threads
that need access to the same shared resource and they are running in to a
deadlocking situation. That would also explain why it's so hard to
reproduce.

Signature

Andrew Faust
andrew[at]andrewfaust.com
http://www.andrewfaust.com

>I am unable to reproduce this at all either in the debugger or not. This
> application runs on about 600 client machines and runs 24x7. The freeze
[quoted text clipped - 45 lines]
>> where
>> the UI thread is blocking?

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.