error: Only in a configuration file or in the Page directive enableSessionState set to true, you can use will .....

Original link: http://www.cnblogs.com/TSPWater/archive/2012/03/16/2399981.html
error:

Only in a configuration file or in the Page directive enableSessionState set to true, you can use the session state. Also make sure <configuration> In the application configuration \ <system.web> \ <httpModules> section comprises System.Web.SessionStateMod or custom session state module.


Solution:

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

Reproduced in: https: //www.cnblogs.com/TSPWater/archive/2012/03/16/2399981.html

Guess you like

Origin blog.csdn.net/weixin_30650039/article/details/95302682