Re: Windows Service Dies on Exception

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



If the library is that unstable, then I would consider isolating it into
another process, or using COM+ to create an out-of-process application pool
which will keep your service from shutting down. This should allow you to
get a more trappable error that your service can process.


--
- Nicholas Paldino [.NET/C# MVP]
- mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx

<jehugaleahsa@xxxxxxxxx> wrote in message
news:1189545324.536462.320800@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
My code uses a crappy LDAP library that has all sorts of issues. My
concern is how to catch the exception that is generated. I have been
asked to use System.Threading.Timer instead. I will try this and see
how it deals.

I did try to use the UnhandledException event in AppDomain.Current,
however, it doesn't even get raised.



.