Why HttpContext.Current.Handler is null?

Paleta picture Paleta · Jun 28, 2009 · Viewed 11.9k times · Source

I'm trying to access a Page within an HttpModule and I think I should do this by calling HttpContext.Current.Handler (This should reference the current page) but I'm getting null all the time.

I'm developing using .Net 3.5 framework.

I'm checking this on AuthorizeRequest and AuthenticateRequest

Thanks.

Answer

mmx picture mmx · Jun 28, 2009

Probably, the request has not been handed out to a handler yet (for example, you're in BeginRequest).