2014-10-20 63 views
0

我面临奇怪的Session Timeout问题。 我在SQLServer中使用的模式,并将超时值设置为20分钟(会话和cookie超时值),但会话在2分钟内过期。 当我在ASPState, 的SQL Server ASPStateTempSessions表中检查会话值时,超时值被设置为1分钟。 这个值是否设置为web.config以外的值?我也验证了machin.config,没有找到任何超时值。SQLServer模式下的会话超时问题

配置值:

sessionState cookieless="UseCookies" mode="SQLServer" sqlCommandTimeout="600" 
sqlConnectionString="server=servername;user id=abcd;password=****" timeout="10" 

这在我的测试环境中正常工作,但相同的配置没有在其他的服务器(分期)工作,设置为1

这里超时值,请让我知道如果你有任何投入。 在此先感谢。

-Sharath

+0

是版本相同的两个开发服务器上,而生产服务器? – Mez 2014-10-20 07:59:47

+0

是的,版本相同 – Sharath 2014-10-20 08:01:45

+0

您是否尝试在sessionState元素中添加allowCustomSqlDatabase =“true”? – Mez 2014-10-20 08:04:50

回答

0

添加web.config文件中的代码

<sessionstate timeout="15"></sessionstate> 

添加perticular将此代码

<authentication mode="Forms"> 
     <forms loginUrl="~/Demo/Demo.aspx" timeout="2880"/> 
</authentication> 
+0

超时值已在sessionState值下的config中设置,但无论设置了哪个值,session都将在2分钟之前过期,DB(Timeout)中的值设置为1分钟。另外,我们在这里没有任何身份验证,所以我认为在身份验证模式下不需要任何更新 – Sharath 2014-10-20 08:03:23