I’ve edited the webconfig in my Web Application (WebForms, .NET 4) adding this :
<customErrors mode="On" defaultRedirect="CustomError.aspx" redirectMode="ResponseRewrite">
<error statusCode="404" redirect="CustomError.aspx" />
</customErrors>
now, If I request this page http://localhost/TestRedirect/asdasdasd (which it doesnt exist) I’d like to get the CustomError.aspx page (where I’ll evalutate the page and redirect to the right source).
But in fact I get the HTTP 404.0 – Not Found. Unfortunatly I can’t use httpErrors (due to my hosting permission), but maybe I can do it with customErrors? Or any other suggesions would be appreciated…
Your request is not coming to ASP.Net engine. Your customErrors tag will work fine if you use the url like
What version of IIS your webhosting provider has?