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 3 4662
"chendricks " <ch********@dis cussions.micros oft.comwrote in message
news:58******** *************** ***********@mic rosoft.com...
>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.
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?
--
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer
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
"John Saunders [MVP]" wrote:
"chendricks " <ch********@dis cussions.micros oft.comwrote in message
news:58******** *************** ***********@mic rosoft.com...
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.
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?
--
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer
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.
--
Andrew Faust
andrew[at]andrewfaust.com http://www.andrewfaust.com
"chendricks " <ch********@dis cussions.micros oft.comwrote in message
news:60******** *************** ***********@mic rosoft.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
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
"John Saunders [MVP]" wrote:
>"chendricks " <ch********@dis cussions.micros oft.comwrote in message news:58******* *************** ************@mi crosoft.com...
>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.
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? -- -------------------------------------------------------------------------------- John Saunders | MVP - Windows Server System - Connected System Developer This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: sidd |
last post by:
Hi all,
how do i exit out(unload) of a windows service in case of an error.
so i have a code block as follows
try
{
}
catch(exception ex)
{
//log to event log
|
by: Jeremy Chapman |
last post by:
I've seen apps where if a windows exe form is running, it publishes a web
service. There is no IIS folders or virtual directories required. Does
anyone have information on how to do this?
|
by: David Palau |
last post by:
We have a internal company WinForms application that makes some calls
out to a intranet web service (once at application start-up for some
configuration info and then periodically during the life of the
application for specific functional requests).
We are getting System.Net.WebException with HTTP 401: Access Denied
errors periodically when...
|
by: UJ |
last post by:
Is there any way for a windows service to start a windows program ? I have a
service that will need to restart a windows app if it needs to.
TIA - Jeff.
|
by: deko |
last post by:
When to use a privileged user thread rather than a windows service?
That's the question raised in a previous post . It was suggested that if the service needs to interact
with a WinForms app (which is the UI used to adjust the actions taken by,
and the schedule of the service), then a privileged user thread should be
used in the UI - no...
| |
by: depalau |
last post by:
I'm running into some issues on maintaining a static variable across
the lifetime of a web service and I was wondering if anyone could help.
Background:
We have developed a C#/1.1 web service running on IIS 5/6 that
interfaces with a 3rd party DLL referenced by using the DLLImport
attribute.
Interacting with this 3rd party software...
|
by: Andy |
last post by:
Hi all, I'm familiar with web service compression and how to implement
it in a Winforms app. What I'm trying to figure out how to do at this
point is how to consume the service from an ASP.NET page. I've surfed
around quite a bit looking for an answer to this, but most of the stuff
I'm seeing is either talking about consuming from a Winforms...
|
by: Joseph Geretz |
last post by:
I've been looking at two approaches for the maintenance of Session state for
a Web Service application.
One approach uses the old familiar Session object which I've used in the
past for Web applications. As far as I can see, the Session approach is
non-standard since Web Services are supposed to be agnostic with respect to
their clients. It...
|
by: =?Utf-8?B?QWRyaWFuIENvbGU=?= |
last post by:
I have written a simple WCF service hosted in a Windows console application
and a simple WCF client console application that connects successfully to
that service and retrieves data. I then ported the console application to
WinForms and also got that to work properly.
My next move was to host the WCF service in a Windows service application....
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |