Asp.net System.Web.HttpContext.Current.Session null in global.asax

后端 未结 4 1514
天涯浪人
天涯浪人 2020-12-10 13:06

I have a custom security principal object which I set in the global.asax for the current thread and all is well, no problems normally.

However, I\'m just adding a dy

4条回答
  •  长情又很酷
    2020-12-10 13:25

    John,

    I'm assuming you're using an ashx handler for the handler. If so, be sure to derive from IRequiresSessionState for example:

    public class Images : IHttpHandler, System.Web.SessionState.IRequiresSessionState
    { }
    

    If you're not using an ashx can you describe what you mean by dynamic image page?

    Josh

提交回复
热议问题