C# Windows service hangs
- From: Ashish Khandelwal <AKhandelwal.india@xxxxxxxxx>
- Date: Wed, 19 Dec 2007 00:39:22 -0800 (PST)
I have a Windows Service in C# talking to a serial port and using
Remoting.
It also uses several COM objects. On server the service will
occassionally hang somewhere - the service still shows on a Task
Manager
list. In Services it says it is still running. However there is no way
to
stop it other than by rebooting the whole computer. No exception
(including
non-CLS) is ever generated. I added a separate System.Timers.Timer
which
detects that the main thread stopped working. I was trying to stop it
by
using System.ServiceProcess.ServiceController.Stop() which didn't
work. I
tried to do process.Kill() which also doesn't work (and no exception).
Is
there a bug in framework somewhere. I don't even hope to find out why
it
hangs but if I could just kill it that would solve the problem since I
have
another Service which would bring it up. I'll be greatful for any
ideas.
.
- Follow-Ups:
- Re: C# Windows service hangs
- From: Willy Denoyette [MVP]
- Re: C# Windows service hangs
- From: Marc Gravell
- Re: C# Windows service hangs
- Prev by Date: Re: Read from stream
- Next by Date: Re: Using anonymous types in a list/collection
- Previous by thread: Read from stream
- Next by thread: Re: C# Windows service hangs
- Index(es):
Relevant Pages
|
Loading