Last post Jul 02, 2007 12:08 PM by ps2goat
Jul 02, 2007 11:54 AM|AppDevForMe|LINK
I am debugging some asp.net code written using .NET 1.0./VS 2003. I noticed that in the web.config file
they use the customErrors attribute to redirect to an error page if an error occurs. This is done by
setting the custom error attribute to "RemoteOnl" Here is the code.
<customErrors mode="RemoteOnly" defaultRedirect="error/PropAvailError.aspx"/>
I was wondering. What is the difference between setting the custom errors mode to "RemoteOnly" as opposed to "On".
What is the difference between the two?
Jul 02, 2007 12:06 PM|zaladane|LINK
here is a link to the doc on MSDN .
hope it helps
Jul 02, 2007 12:06 PM|khaos|LINK
What this means is that when you are *NOT* on the local machine you will be redirected to a nice error page. When you are debuging or on the physical box you can get the real error page.
Jul 02, 2007 12:07 PM|benrick|LINK
if it is set to remote only then that means that only the people who are not at localhost will be sent to the custom error page
anyone from localhost will receive not be sent away and will be able to see the error message. This allows you to debug from the server if necessary. If it is set to On then even someone on the web server will not get to see the actual error which occurred.
I hope that helps,
Jul 02, 2007 12:08 PM|ps2goat|LINK
RemoteOnly means that if an error occurs, only someone viewing the page on the local machine can see the exact error message.
When custom errors is On, then you can set a custom error page that makes the error user friendly, not to mention it can use a layout and formatting that is consistent with your site. This custom page you create could show the entire error (not a good idea
for non-administrators) or a user-friendly error, such as "We're sorry... we are unable to process your request at this time". However, the "We're sorry" error message is a lot nicer than displaying either a stack trace or an "enable custom errors to view
the error" page.