开发者

IHttpHanlder returns null session

开发者 https://www.devze.com 2022-12-11 23:46 出处:网络
So i have a couple of custom Http Handlers for different file types. I开发者_Go百科 have implemented the IRequiredSessionState marker, but still recieving context.Session as null?

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

Do you need to initialize the Session somehow?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消