jbraem
February 2nd, 2010, 04:49 AM
Hello,
i've got a question on requesting the 401 error page on my IIS server.
public static void Not_Authorized()
{
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.ClearContent();
HttpContext.Current.Response.ClearHeaders();
HttpContext.Current.Response.Write("U bent niet gemachtigd om deze pagina te zien");
//HttpContext.Current.Response.StatusDescription = "Access Denied";
//HttpContext.Current.Response.StatusCode = 401;
HttpContext.Current.Response.End();
}
i've got the methode Not_authorized and this methode must call the 401 acces denied page. Instead of the message i'm now writing in the browser. How do i do this? Something with a redirect or something?
kind regards
Joey
i've got a question on requesting the 401 error page on my IIS server.
public static void Not_Authorized()
{
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.ClearContent();
HttpContext.Current.Response.ClearHeaders();
HttpContext.Current.Response.Write("U bent niet gemachtigd om deze pagina te zien");
//HttpContext.Current.Response.StatusDescription = "Access Denied";
//HttpContext.Current.Response.StatusCode = 401;
HttpContext.Current.Response.End();
}
i've got the methode Not_authorized and this methode must call the 401 acces denied page. Instead of the message i'm now writing in the browser. How do i do this? Something with a redirect or something?
kind regards
Joey