J
José Joye
On all my Windows Services (written in C# and for some of them in MC++), I
got from time to time crashes at startup (1 out of 10 startup). It occurs
really at the time I click on the "Start service" button.
I have try/catch sections all around, and also have defined an
"UnhandledExceptionEventHandler" in the ctor of the Service Main().
I'm still not able to catch what is going on :-((
The error is:
I do suspect that this may occurs in one of my common assemblies. Probably
in some static member/class initializations.
What I did is to try to place suspect static initializations in a class
initializer and place them within a try/catch sections.
I tried to start the service as a normal program (according to description
shown in MSDN). However, it works ok this way.
Here are my questions:
- If I place a try/catch section in a class initializer, will the catch be
hit in case of problem?
- How could I point out to the location where the problem occured using the
error message shown
- Is it possible to debug the application?
If I press Cancel, DrWatson generates a log. I would like to run JIT
debugger instead
Any help greatly appreciated!!!
José
got from time to time crashes at startup (1 out of 10 startup). It occurs
really at the time I click on the "Start service" button.
I have try/catch sections all around, and also have defined an
"UnhandledExceptionEventHandler" in the ctor of the Service Main().
I'm still not able to catch what is going on :-((
The error is:
I do suspect that this may occurs in one of my common assemblies. Probably
in some static member/class initializations.
What I did is to try to place suspect static initializations in a class
initializer and place them within a try/catch sections.
I tried to start the service as a normal program (according to description
shown in MSDN). However, it works ok this way.
Here are my questions:
- If I place a try/catch section in a class initializer, will the catch be
hit in case of problem?
- How could I point out to the location where the problem occured using the
error message shown
- Is it possible to debug the application?
If I press Cancel, DrWatson generates a log. I would like to run JIT
debugger instead
Any help greatly appreciated!!!
José