HttpContext.Current.Session为null的问题
2011-09-04 16:33
483 查看
在网上看了很多,最后还是自己找到了答案!!!
通过post请求将用户信息提交到处理页面(*.ashx),然后通过处理页面调用类库中某个类下的登录方法
之前当调用登录方法时做了判断:if (HttpContext.Current.Session != null) 这个时候Session始终的null
于是将该类实现了接口:IRequiresSessionState (using System.Web.SessionState;)
结果Session还是null。。。
接着我把处理页也继承接口:public class ActionsHander : IHttpHandler, IRequiresSessionState
问题解决了!!!
.
通过post请求将用户信息提交到处理页面(*.ashx),然后通过处理页面调用类库中某个类下的登录方法
之前当调用登录方法时做了判断:if (HttpContext.Current.Session != null) 这个时候Session始终的null
于是将该类实现了接口:IRequiresSessionState (using System.Web.SessionState;)
结果Session还是null。。。
接着我把处理页也继承接口:public class ActionsHander : IHttpHandler, IRequiresSessionState
问题解决了!!!
.
相关文章推荐
- HttpContext.Current.Session为null的问题
- HttpContext.Current.Session为null
- System.Web.HttpContext.Current.Session为NULL值的问题?
- System.Web.HttpContext.Current.Session为NULL值的问题?
- HttpContext.Current.Session 为null
- 异步 HttpContext.Current实现取值的方法(解决异步Application,Session,Cache...等失效的问题)
- 问题:HttpContext.Current.Session;结果:Session与HttpContext.Current.Session到底有什么区别呢?
- 异步 HttpContext.Current实现取值的方法(解决异步Application,Session,Cache...等失效的问题)
- 有关httpContext.Current.Session[值] 取值的问题
- System.Web.HttpContext.Current.Session NullReference错误
- 异步 HttpContext.Current实现取值的方法(解决异步Application,Session,Cache...等失效的问题)
- System.Web.HttpContext.Current.Session为NULL值的问题?
- 一般处理程序中 httpContext.current.session为null的解决办法
- httpContext.Current.Session[值] 取值的问题
- System.Web.HttpContext.Current.Session为NULL解决方法
- System.Web.HttpContext.Current.Session为NULL值的问题?
- abp项目中无法使用HttpContext.Current.Session[""]的问题
- HttpContext.Current.Session.SessionID相关问题及备忘
- System.Web.HttpContext.Current.Session为NULL值的问题?