I am using VS 2010. I did changes in the code to log the application exceptions. In visual studio, when I debug, I am able to log all the exceptions in the folder allotted for that. But I'm not able to log the exceptions when I publish my application. (System.StackOverFlowException
occurred in mscorlib.dll
) This is the error I'm getting from the published application when I'm getting an exception and I'm not able to log any application related exceptions.
Asked
Active
Viewed 127 times
-1

Manfred Radlwimmer
- 13,257
- 13
- 53
- 62

Ganesh Chemanchula
- 17
- 6
-
Why do you get the exception in the first place? Can't you debug it locally, fix the issue and then publish the fixed application? – Jakub Jankowski Sep 06 '16 at 06:29
-
First, you should do everything in your power to be able to log errors in the production environment, but in case it is really impossible, you can find your exception details in Windows Event Viewer most of the time – slawekwin Sep 06 '16 at 06:30
-
2Please go over the [question checklist](http://meta.stackoverflow.com/questions/260648/stack-overflow-question-checklist) and then [edit] your question accordingly. An [mcve] would help because at the moment you rely on our guessing abilities – rene Sep 06 '16 at 06:31
-
The type `System.StackOverFlowException` does not exist in mscorlib. I assume you meant `System.StackOverflowException` (note the casing). While being pedantic, that underlines the issue that you should provide actual code that exhibits the issue you see. – Christian.K Sep 06 '16 at 06:51
-
This old entry might be helpful: http://stackoverflow.com/questions/206820/how-do-i-prevent-and-or-handle-a-stackoverflowexception – Greg Sep 06 '16 at 07:38
1 Answers
0
You cannot catch a System.StackOverFlowException
. Unless you are throw it yourself or your application runs within a debugger or other host process.
You must use a debugger to capture the exception. If the exception doesn't occur in your test setup, you should get the data the 'user' is using.

Jeroen van Langen
- 21,446
- 3
- 42
- 57
-
I think it was downvoted because the original answer was more like a comment. – Mixxiphoid Sep 06 '16 at 07:36