为什么我的网页过期这么快?

编程入门 行业动态 更新时间:2024-10-25 23:23:37
本文介绍了为什么我的网页过期这么快?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家好, 我最近完成了一个网站的开发,该网站具有用于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"

更多推荐

为什么我的网页过期这么快?

本文发布于:2023-10-15 12:03:31,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1494283.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:网页

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!