Session state can only be used when enableSessionState.....................

1 Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration>\<system.web>\<httpModules> section in the application configuration.

在网站的Handler.ashx中操作Session会报enableSessionState异常,在webconfig中配置貌似也不行,其实这里只需要

 1 public class Handler : IHttpHandler, IRequiresSessionState  

实现一下这个接口就行了。


posted @ 2015-03-23 17:19  厸厸  阅读(194)  评论(0编辑  收藏  举报