I'm working on some error handling in my MVC app, and I'd like to change asperrorpath
to something that doesn't give away the fact that I'm using .NET... something like path
Can anyone give me some direction on how to change that out?
I'm working on some error handling in my MVC app, and I'd like to change asperrorpath
to something that doesn't give away the fact that I'm using .NET... something like path
Can anyone give me some direction on how to change that out?
my wprk around is using
At the bottom most, which I have
NotFound
action inHomeController
. It will simply catch all other urls.The are many ways you can solve your problem. It depends what you want.
<error statusCode="403" redirect="NoAccess.htm" />
Add
redirectMode="ResponseRewrite"
to the customErrors section. That worked for me.By supplying custom query string, your aspxerrorpath won't show up.
Check the original answer from this link: how to prevent “aspxerrorpath”
Just add dummy query string to your .htm pages as below.
Check with fiddler, the asperrorpath query string does not appear anymore and referrer of errorpage.htm is completely clean.