ashx中使用HttpContext.Current.Session ,出现未将对象引用设置到实例

1.using System.Web.SessionState;

2.public class {ClassName}: IHttpHandler, IReadOnlySessionState{…}

“IReadOnlySessionState”,指定目标HTTP处理程序只需要具有对话访问状态值的读访问权限。

原文地址:https://www.cnblogs.com/lenga/p/3937971.html