修改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="140000"    
          />  
   
  注意: mode="StateServer"这种模式下即使修改页面也不会丢失session!   
       mode="InProc"如果你的模式为这种,修改页面的时候会丢失session!

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-24
  • 2022-01-05
  • 2021-08-12
  • 2022-01-08
  • 2021-08-10
  • 2022-12-23
猜你喜欢
  • 2021-05-22
  • 2021-07-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-15
  • 2021-06-18
相关资源
相似解决方案