本文介绍了为什么我的网页过期这么快?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好, 我最近完成了一个网站的开发,该网站具有用于Admin.Control的控制面板.我登录并添加了一些信息,因此有时添加了某些信息,有时又将我重定向到登录"页面.知道这仅在1分钟内发生,这意味着会话已完成由于我在web.config中将超时指定为30,所以还没有完成.所以这可能与表单身份验证超时有关,该超时也设置为30分钟吗? 在此先感谢您.
Hi ALL , I recently finished developing a website that has a control panel for the Admin.I Login and add some info,so sometimes they are added and sometimes i am redirected to the Login page.Knowing that this happens in 1 minute only which means the session did not finish yet since i specified timeout to 30 in web.config.So can this be related to forms authentication timeout which is also set to 30 mins ? Thanks in advance.
推荐答案您可以在web.config中设置会话过期的时间.您还可以在代码中设置一个断点,以查看代码是否在您认为应该重定向之前进行重定向. You can set how long the session takes to expire in your web.config. You can also set a breakpoint in your code, to see if your code is somehow redirecting before you think it should.
第一个问题是:这是在Visual Studio中发生的吗? 如果不是,则可能是IIS问题. 例如, 如果IIS认为它检测到死锁,或者服务器内存使用率超过60%(这是默认值),则应用程序将回收,这将导致终止会话. 希望对您有帮助 First question is: is this happening in you Visual Studio? if not, it might be IIS issue. for example, if IIS thinks it detected a dead lock or if server memory usage is over 60% (this is default value) the application will recycle, which will lead to killing your session. Hope it helped
我通过将其添加到web.config中来对其进行了修复: machineKey validationKey="..." decryptionKey="..." validation="SHA1" decryption="AES" I fixed it by adding this to the web.config : machineKey validationKey="..." decryptionKey="..." validation="SHA1" decryption="AES"
更多推荐
为什么我的网页过期这么快?
发布评论