Phil5780
asked on
ASP.NET 403 redirect not captured?
My ASP.NET 4.0 application seems to ignore my custom 403 redirect. I have prevented reading of a log folder on the site. If a user navigates to it on a browser they recieve a 403.14 'read not permitted' error. All my error conditions default to the 404 page, why?
Here's my web.config custom error markup:
<customErrors mode="On" defaultRedirect="OopsAnErr or.aspx" >
<error statusCode="403" redirect="Restricted.aspx" />
<error statusCode="404" redirect="PageNotFound.asp x" />
</customErrors>
Here's my web.config custom error markup:
<customErrors mode="On" defaultRedirect="OopsAnErr
<error statusCode="403" redirect="Restricted.aspx"
<error statusCode="404" redirect="PageNotFound.asp
</customErrors>
May be a very simplistic question but do the files; OopsAnError.aspx and Restricted.aspx both exist?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Can membership provider be used with requiring a user to login?
ASKER
Thanks
http://forums.asp.net/t/1462153.aspx
You can also set the error page on each web page if you want. Check this out:
http://www.beansoftware.com/ASP.NET-Tutorials/Custom-Error-Pages.aspx
I hope this helps.