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

后端 未结 4 1516
天涯浪人
天涯浪人 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:35

    Session has nothing to do with being logged in or not.

    What event are you overriding when you want access to the session? Session isn't available until AcquireRequestState has been fired.

    For more information, see: http://msdn.microsoft.com/en-us/library/9ysfzy8h.aspx

提交回复
热议问题