error:只有在配置文件或 Page 指令中将 enableSessionState 设置为 true 时,才能使用会..

error:

只有在配置文件或 Page 指令中将 enableSessionState 设置为 true 时,才能使用会话状态。还请确保在应用程序配置的 <configuration>\<system.web>\<httpModules> 节中包括 System.Web.SessionStateMod 或自定义会话状态模块。


解决方法:

<pages enableSessionState="true"></pages>

原文地址:https://www.cnblogs.com/TSPWater/p/2399981.html