S
Si
Hi,
How can I create a 404 error from the code, which will look on the
client side _exactly the same_ as he was trying to access a non
existing page ?
I want to use to filter users.
e.g., in global.asax:
pseudo code:
=========================
Application_BeginRequest(..)
{
if Request.Url.LocalPath.Contains("admin")
{
// next 2 lines no good since client doesnt see the "404" page
Response.Status = 404;
Response.End
}
}
=========================
The above code is not good enough for me, since the client is not
redirected to see a 404 in the browser,
or redirected to the 404 page which is web.config
I can use "Response.Redirect("404.aspx") for the custom 404 page,
but I want a "real" 404.
Thanks for any help.
How can I create a 404 error from the code, which will look on the
client side _exactly the same_ as he was trying to access a non
existing page ?
I want to use to filter users.
e.g., in global.asax:
pseudo code:
=========================
Application_BeginRequest(..)
{
if Request.Url.LocalPath.Contains("admin")
{
// next 2 lines no good since client doesnt see the "404" page
Response.Status = 404;
Response.End
}
}
=========================
The above code is not good enough for me, since the client is not
redirected to see a 404 in the browser,
or redirected to the 404 page which is web.config
I can use "Response.Redirect("404.aspx") for the custom 404 page,
but I want a "real" 404.
Thanks for any help.