S
Steve - DND
When certain conditions are met on my ASPX pages, I want to set the status
of the response to 403, and have it handled by the custom 403 page I have
specified in my web.config file. Unfortunately it's not working. In my ASPX
page I have:
....
Response.StatusCode = 403;
....
In my web.config, I have:
<customErrors mode="On">
<error statusCode="403" redirect="403.aspx"/>
<error statusCode="404" redirect="404.aspx"/>
</customErrors>
If I do a Response.Write(Response.StatusCode) it says that it's 403, but I
never get redirected to the custom 403 page, it just continues loading the
page normally. Any thoughts?
Thanks,
Steve
of the response to 403, and have it handled by the custom 403 page I have
specified in my web.config file. Unfortunately it's not working. In my ASPX
page I have:
....
Response.StatusCode = 403;
....
In my web.config, I have:
<customErrors mode="On">
<error statusCode="403" redirect="403.aspx"/>
<error statusCode="404" redirect="404.aspx"/>
</customErrors>
If I do a Response.Write(Response.StatusCode) it says that it's 403, but I
never get redirected to the custom 403 page, it just continues loading the
page normally. Any thoughts?
Thanks,
Steve