I have a windows service that does some intensive work every one minute (actually it is starting a new thread each time in which it syncs to different systems over http). Th
Based on the information that you provided, I would at least, at the minimum, do the following:
AppDomain.CurrentDomain.UnhandledException
won't help you - a StackOverflowException
being one of them. I believe the CLR will simply just give you a string in this case instead of a stack trace.An example of an often overlooked StackOverflowException
is:
private string myString;
public string MyString { get { return MyString; } } //should be myString
Just in case any other person is having the same problem, in my case I found that my windows service was trapped in an endless recursive loop accidentally. So If anyone else have this problem, take in consideration method calls that may be causing huge recursive loops.
I got this on a particular computer and traced it to a c# object referencing itself from within an initializer
Just as a 'for what it is worth' - in my case this error was reported when the code was attempting to write to the Windows Event Log and the interactive user did not have sufficient permission. This was a small console app that logged exceptions to a text file and the event log (if desired). On exception, the text file was being updated but then this error was thrown and not caught by the error handling. Disabling the Event Logging stopped the error occurring.