在开发过程中发现实现了IHttpHandler后,使用session发现出错,

出错原因 context.Session 为null,后来得知,实现IHttpHandler接口后,还是不能用Session的,

必须再继承IRequiresSessionState接口,该接口无任何方法和属性,

只要继承就可以运用Session了,该接口在using System.Web.SessionState命名空间下!

相关文章:

  • 2021-10-13
  • 2022-12-23
  • 2021-06-22
  • 2021-11-11
  • 2022-12-23
  • 2022-02-01
  • 2021-04-19
  • 2021-09-05
猜你喜欢
  • 2021-10-09
  • 2022-12-23
  • 2021-10-08
  • 2022-03-02
  • 2022-12-23
  • 2021-09-19
  • 2021-08-05
相关资源
相似解决方案