Aspnet意外注销 [英] Aspnet unexpected logout

查看:71
本文介绍了Aspnet意外注销的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个正在使用aspnet mvc 5的项目中工作,并且在页面中闲置5分钟后,我们有一些意外退出的问题.

I'm working in a project where we are using aspnet mvc 5 and we have some problems with a unexpected logout after 5 min of inactivity in a page.

我的web.config中有这个

I have this in my web.config:

<sessionState timeout="30"/>
<authentication mode="None"/>

您认为导致该项目的原因是什么?

What you think are causing this about project?

如果需要更多信息,请询问.

If need more information ask please.

谢谢.

PS:我的身份验证类型为ApplicationCookie

PS: My AuthenticationType is ApplicationCookie

PS2:在web.config中添加了机器密钥,几分钟后仍然注销:

PS2: Added machine key to web.config and still logout after a couple of minutes:

<machineKey validationKey="string" decryptionKey="otherstring" validation="SHA1" decryption="AES" />

PS3:在本地,一切正常.

PS3: Locally everything works fine.

推荐答案

请延长您的应用程序池超时.它将解决此问题,因为从配置发布开始,您的网站正在使用默认的Session InProc模式.

Please extend your application pool timeout. It would solve the problem as from config posted, your website is using Session InProc Mode, the default one.

一旦应用程序被回收,存储在w3wp进程中的信息就会消失.

Once the application recycled, your information stored in w3wp process would be gone.

由于您正在使用云服务,因此您可能还需要检查负载平衡的工作方式.

Since you are using cloud services, you might also want to check how the load balancing works.

如果他们不使用粘性会话,最好将会话模式也更改为StateServer或SQLMode.

If they are not using sticky session, best is you change your session mode as well to StateServer or SQLMode.

希望它会有所帮助.让我知道结果.谢谢

Hope it helps. Let me know the result. Thanks

这篇关于Aspnet意外注销的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆