how to track the exception in the application
In fact I have Idea about the exception handling. But while facing the interview I got this question by interviewer that , How to track the exception in application. means let say there is enterprise project, If we deliver the project to end user (forget for a while any tester is there/ or in my side who can track this exception). and while navigating or doing any operation , a custom error page occurs, which is define by developer from his web.config file.
let say application is of asp.net and c#
then 开发者_如何学编程how user will let know to developer that he get something exception while doing particular operation ? How developer can tack this exception without having any kind of debugging. Let say user not allow to deploy again. developer want to track this exception on deployed application. What he must to do. I know we can put try..Catch but need to now particulars..
Have a look at ASP.NET health monitoring.
You can log exceptions to eventlog, files or even email.
What leppie said. Look into Application-Level Tracing in Visual Studio .NET.
If your code is properly handling exception, you will see those error being logged in event log.
Event though for all unhandled error also logged in eventlog but you may not know where exactly the error is but at least will give you an idea what part of the application is breaking.
精彩评论