Thursday, June 26, 2014

Hide / Show Custom Errors in Asp.net

If you are seeing "Runtime Error" in your asp.net page and would like to see detail and actual line where the error is happening, this is what we need to do:

In Web.config file, look for tag "customErrors" tag and set the value as:


<customErrors mode="On" />        THIS WILL HIDE ERROR AND SHOW RUNTIME MESSAGE
<customErrors mode="Off" />        THIS WILL SHOW REAL MESSAGE


HTH

No comments: