关于 IFrame中Session丢失

来源:互联网 发布:死亡岛终极版优化 编辑:程序博客网 时间:2024/04/28 06:19
 

IFrame中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="40" 
/> 

二:

在页面page_onload里添加一语句: 
Response.AddHeader("P3P","CP=CAO PSA OUR");