View Single Post
  #4 (permalink)  
Old February 28th, 2012, 08:06 PM
irProject irProject is offline
Friend of Wrox
Points: 742, Level: 10
Points: 742, Level: 10 Points: 742, Level: 10 Points: 742, Level: 10
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2009
Location: Tehran, Iran
Posts: 156
Thanks: 13
Thanked 16 Times in 16 Posts
Smile

Hi sophia

I think the problem maybe with Handler-Call-Time. when your handler is called?

Code:
public void Init(HttpApplication context)
{
    context.AuthorizeRequest += new EventHandler(context_AuthorizeRequest);
    context.PostAuthorizeRequest += new EventHandler(context_PostAuthorizeRequest);
}

void context_PostAuthorizeRequest(object sender, EventArgs e)
{
    throw new NotImplementedException();
}

void context_AuthorizeRequest(object sender, EventArgs e)
{
    HttpApplication context = (HttpApplication)sender;
    Rewrite(context);
}
these are two different calls: you may need to call your handler in PostAuthorizeRequest event of HttpContext object
__________________
happy every time, happy every where

Reza Baiat
Reply With Quote