.net – Why HttpContext.Current.Handler is null


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


Best Solution

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