Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>When logging to the database fails, you could write to the server's Event Log, or to a Log.txt file. You choice here partly depends upon whether you have access to the web servers containing those.</p> <p>Sending error notification emails is a good idea if you need a speedy response. But there's no list of the errors to scan through them.</p> <p>I do this by creating a special custom exception class with properties including user information (ID, name if available), all of the session variables, all of the form variables (so you can see how the form was populated and what the user entered), and some indication beyond the stack trace of where the error occurred (which page, which class, which method). Also include the name of the stored procedure called and the parameters send, or the SQL itself. Also all of the Exception properties (stack trace, etc). And DisplayMessage and InternalMessage fields. The DisplayMessage is displayed to the user. The InternalMessage is recorded in the log, and displayed on the custom error page when in debug mode.</p> <p>I do the logging in Page_Error on the base page, and as a fail-safe in Application_Error.</p> <p>Sometimes I add a key-value pair in web.config to contain my email address (or a distribution list). If there is a vaue in that key, a notification email gets sent. If there's no value, no eomail is sent. Then, during testing or early production, I can get immediate personal notification of the problem. After the initial period passes, I remove the email address in web.config.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload