Reputation: 25161
A few questions on handing errors- I assume it's best to handle them in Application_OnError(){}?
Do you then prefer to write them error to the event log, write them to a custom file locally or email them?
If the latter, do you use any specialist libraries to pre-format the exception email?
Upvotes: 1
Views: 123
Reputation: 11626
you should also handle "unhandled exceptions". see here . YOu can read more about it in MSDN
Upvotes: 1
Reputation: 10074
For some applications we use Log4Net, for others we use the EnterpriseLibrary Logging Application Block. They both can write the errors to a log file in a predefined format. The Logging Application Block also supports sending the error by email. Well worth checking out.
Upvotes: 2
Reputation: 161821
If you take no action at all, ASP.NET Health Monitoring will log the errors for you. By default it will log to the Windows Event Log.
Upvotes: 1