D
damiensawyer
Hi,
I'm trying to do something in global.asax that I would have thought to
be quite simple. Basically, any request at all should get sent to
another page. I actually got the code below from a book. For some
reason, it's not working.
Can someone please tell me what I'm doing wrong?
Thanks in advance,
Damien
protected void Application_BeginRequest(object sender,
EventArgs e)
{
// this causes a "redirect loop"
Response.Redirect(Request.ApplicationPath + "/Forms/
LoginPage.aspx");
// This just "doesn't work" - standard page loads.
Context.RewritePath(Request.ApplicationPath + "/Forms/
LoginPage.aspx");
}
I'm trying to do something in global.asax that I would have thought to
be quite simple. Basically, any request at all should get sent to
another page. I actually got the code below from a book. For some
reason, it's not working.
Can someone please tell me what I'm doing wrong?
Thanks in advance,
Damien
protected void Application_BeginRequest(object sender,
EventArgs e)
{
// this causes a "redirect loop"
Response.Redirect(Request.ApplicationPath + "/Forms/
LoginPage.aspx");
// This just "doesn't work" - standard page loads.
Context.RewritePath(Request.ApplicationPath + "/Forms/
LoginPage.aspx");
}