When users are entering information on my site and experience an exception, what is the best way to capture that exception. I would like to know what were they filling out on the form when the exception occurred. How have you handled it? what tool have you used? I have looked into ELMAH and log4net and currently trying to use log4net to capture this information. Any suggestions on what is the best way to capture form fields?
When users are entering information on my site and experience an exception, what is
Share
In your
Application_Errorin Global.asax.cs, you can access the following and log them. This is what we do (with our specifics removed).Obviously in place of each
var whatever = ..., you would doLogInSomeWay(whatever). This code just demonstrates assigning each important piece of the current experience to a variable.Hope this helps.
Code