Last post Jul 23, 2013 09:26 AM by ramu.net
Jul 22, 2013 11:16 AM|mmacneill123|LINK
Hi folks, found a lot of posts about this but no answers :-)
I have a error redirect: <customErrors mode="RemoteOnly" defaultRedirect="~/Errors/index.htm"/>
The URL which is being generated on an error is this..../Errors/index.htm?aspxerrorpath=/customer/order/reorder.aspx
This I thought would be correct and the site displays index.htm if i access it directly but when an error occurs on the site it displays the standard .NET error page -
If i set the setting to 'Off' it displays the exception trace as expected -
*it seems to be treating the ?aspexrrorpath as part of the address which then overrides the index.htm address and so displays the standard error.
I have added explicit permissions to the custom errors page for all users after reading other posts:
Any suggestions as to why the defaultRedirect is not working?
Jul 22, 2013 03:24 PM|Ruchira|LINK
When you set the mode to RemoteOnly, it only works when you browser your website outside from your server. Try by setting it to
<customErrors mode="On" defaultRedirect="~/Errors/index.htm"/>
Please 'Mark as Answer' if this post helps you
Jul 23, 2013 07:03 AM|mmacneill123|LINK
Thanks Ruchira, already been around the block with that one, i was testing the live site after getting .NET errors whilst testing it :-)
Stumbled across the 90% solution after reading about a patched vulnerability in .NET back in 2010 using the asperrorpath that was attached by default to .NET errors. It still dumps the page theme but at least displays the page. I think displaying the error
causes a loss of authentication context which is probably buried in the code somewhere but at least the page now displays:
<customErrors mode="On" defaultRedirect="~/Errors/UnHandledError.aspx" redirectMode="ResponseRewrite"/>
The redirectMode needs to be specified because the asperrorpath part of the query was exploited in the hack and an HTTP error is always raised instead.
The 100% solution required an update the error page to an aspx page on the pilot site as well as the attribute and everything now seems to behave
Thanks for your response which was the only one!!
Jul 23, 2013 09:26 AM|ramu.net|LINK
MAy the below link help you more.