.ashx.cs 页面中使用 Session

作者:vkvi 来源:ITPOW(原创) 日期:2020-2-3

默认情况下,在 .ashx.cs 页面中使用 Request、Response 可通过 HttpContext 实现,但是 Session 为 null,怎么解决?

增加 System.Web.SessionState.IRequiresSessionState 继承。示例:

 

相关文章