Jan de Jager
Jan de Jager

Reputation: 870

IHttpHanlder returns null session

So i have a couple of custom Http Handlers for different file types. I have implemented the IRequiredSessionState marker, but still recieving context.Session as null?

Do you need to initialize the Session somehow?

Upvotes: 0

Views: 150

Answers (1)

Mehrdad Afshari
Mehrdad Afshari

Reputation: 422162

Have you enabled session in your Web.config file? No, you don't need to perform any particular initialization:

<sessionState mode="InProc" />

By the way, the interface name is System.Web.SessionState.IRequiresSessionState, not IRequiredSessionState.

Upvotes: 1

Related Questions