怎样使编译后,Session值不丢失。

第一步:现在web.config文件修改如下设置,
<sessionState mode="StateServer" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
   cookieless="false" timeout="90" />
第二步:在windows的管理工具的服务中将ASP.NET State Service设为自动启动服务。
原文地址:https://www.cnblogs.com/JimZhang/p/283649.html