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_Beg inRequest(objec t sender,
EventArgs e)
{
// this causes a "redirect loop"
Response.Redire ct(Request.Appl icationPath + "/Forms/
LoginPage.aspx" );
// This just "doesn't work" - standard page loads.
Context.Rewrite Path(Request.Ap plicationPath + "/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_Beg inRequest(objec t sender,
EventArgs e)
{
// this causes a "redirect loop"
Response.Redire ct(Request.Appl icationPath + "/Forms/
LoginPage.aspx" );
// This just "doesn't work" - standard page loads.
Context.Rewrite Path(Request.Ap plicationPath + "/Forms/
LoginPage.aspx" );
}
Comment