c# - Why doesn't my AppDomain.CurrentDomain.UnhandledException event always fire? -


i have windows service program running in release mode runs 24/7 makes in-process com calls c++ library , crashes log4net log call in appdomain.currentdomain.unhandledexception event doesn’t fire.

instead process terminates , eventlog log message written … what’s strange again code doesn’t have eventlog.writeentry calls.

can me figure out why appdomain.currentdomain.unhandledexception not firing in cases?

thanks in advance

event log message:

eventtype clr20r3, p1 programname.exe, p2 0.0.0.0, p3 4d5bd49f, p4 mscorlib, p5 2.0.0.0, p6 4a7cd8f7, p7 41b3, p8 a3, p9 system.argumentoutofrange, p10 nil.

the entry in event log written windows, , telling throwing argumentoutofrangeexception. without seeing code contained in event handler appdomain.currentdomain.unhandledexception, it's difficult why, it's 1 of following occuring:

  • your exception handler throwing argumentoutofrangeexception
  • you have multiple appdomain's in process , it's 1 of other ones throwing argument out of range exception.

the former more likely. review code in exception handler very carefully , anywhere bad argument passed. try wrapping entire exception handler in try`catch` logs exception occurs within exception handler event log , see if further information, such stack trace.

also, make sure you're deploying debug symbols (.pdb files) application stack traces logged give line numbers refer to.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -