Brett
Brett

Reputation: 4166

HttpContext.Current.Session is null in OnPostAuthenticateRequest

This is a n00b question, perhaps you can help.

When I'm in the Application_OnPostAuthenticateRequest event, I am unable to look into the Session since HttpContext.Current.Session is null. Is there a reason that this is null, and is there a way I can access the Session during this event?

Is there an alternative event that allows me to get the authenticated user in addition to the session state?

Thanks! Brett

Upvotes: 0

Views: 471

Answers (1)

Richard Deeming
Richard Deeming

Reputation: 31198

The Session won't be available before the PostAcquireRequestState event is raised.

Upvotes: 1

Related Questions