Can I capture any server error to display on mycustompage.htm? How?
Not with that setting. You need to write code for displaying the stack trace onto an error page and redirect the browser to that error. You should handle the Application_Error handler in the Global.asax.cs class. Remember, all application error eventually
bubbled upto the application, if not handled by a catch statement in your code. So, Application_Error handler knows all the errors that occur in the application, so thats the best place to put the code to catch the stacktrace from the exception
thuhue
All-Star
15625 Points
3146 Posts
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
May 18, 2005 03:06 AM|LINK
If I configure Web.config as below :
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
Can I capture any server error to display on mycustompage.htm? How?
Thanks.
Kumar Reddi
Star
14340 Points
2619 Posts
Re: <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
May 25, 2005 01:05 AM|LINK
Not with that setting. You need to write code for displaying the stack trace onto an error page and redirect the browser to that error. You should handle the Application_Error handler in the Global.asax.cs class. Remember, all application error eventually bubbled upto the application, if not handled by a catch statement in your code. So, Application_Error handler knows all the errors that occur in the application, so thats the best place to put the code to catch the stacktrace from the exception