I've had this same problem from with-in a service.  I can throw the error and stop the 
service, but windows does not restart it.  Though the option to restart it is set.  
The problem may be that the option to restart the service is only invoked if the 
service actually stops abnormally, so maybe you shouldn't trap the error at all.

I worked around it by having another service monitor the service and re-start it.  
Kind of dumb, but it works.

bob



---------- Original Message ----------------------------------
From: "Glenn Frankel" <[EMAIL PROTECTED]>
Reply-To: "dotnet" <[EMAIL PROTECTED]>
Date: Mon, 16 Dec 2002 08:11:36 -0800

>I have a Windows Service that I have created in C# which calls a DB every
>few seconds and then performs some processing.  At times, I receive a DB
>timeout or an exception when processing.  I have attempted to handle all
>exceptions, but if one goes through I want to terminate and let the
>Windows restart the service.  I have attemped to throw the exception is
>high as I could, but the service would never restart.  Does anyone know to
>accomplish this?
>
>---
>You are currently subscribed to dotnet as: [EMAIL PROTECTED]
>To unsubscribe send a blank email to %%email.unsub%%
>
>---------
>Administrated by 15 Seconds : http://www.15Seconds.com
>List Archives/Search : http://local.15Seconds.com/search
>Subscription Information : http://www.15seconds.com/listserv.htm
>Advertising Information: http://www.internet.com/mediakit/
>
>
>

---
You are currently subscribed to dotnet as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

---------
Administrated by 15 Seconds : http://www.15Seconds.com
List Archives/Search : http://local.15Seconds.com/search
Subscription Information : http://www.15seconds.com/listserv.htm
Advertising Information: http://www.internet.com/mediakit/


Reply via email to