网站注销时间问题

时间:2013-05-21 05:13:22

标签: asp.net-mvc web web-config session-timeout

我的网站在15分钟后自动退出。我想在两小时或一天内设置超时。

请参阅下面的Webconfig代码

 <authentication mode="Forms">
      <forms loginUrl="~/Account/Login" defaultUrl="~/Account/Login"  protection="All"  slidingExpiration="false" timeout="3600"/> 
    </authentication>
  <sessionState mode="InProc" cookieless="false"  timeout="3600"></sessionState>

我在谷歌搜索更多答案,我在超时属性中放了很多分钟。但它不起作用。任何时间仅在15分钟后退出。

你能帮帮我吗?我怎么解决这个问题?

1 个答案:

答案 0 :(得分:0)

可能是您的应用程序被回收并且自动分配了新的机器密钥。您可能需要在web.config中分配机器密钥。您可以从here

生成机器密钥
<system.web>
    <machineKey validationKey="MACHINEKEY"
                decryptionKey="decrypt key here" 
                validation="SHA1" decryption="AES" />