如何增加会话超时在MVC 3 [英] How to increase Session timeout in MVC 3

查看:114
本文介绍了如何增加会话超时在MVC 3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ASP.NET MVC 3(剃刀)申请,我面临着频繁的会话超时。结果
有没有增加会议的价值的方式?

I have an ASP.NET MVC 3 (Razor) Application and I am faced with frequent session timeouts.
Is there a way to increase the value of the session?

推荐答案

你没有提供足够的细节,比如你的配置,问题描述等。

You're not providing enough details, such as your configuration, description of the problem etc.

这是怎么回事更准确?这篇文章可以帮助:
随机会话超时ASP.NET MVC3 结果
如果没有,你可以在你的的web.config 文件中使用这样的配置:

What's happening more exactly? This article may help: Random Session Timeout in ASP.NET MVC3
If not, you could use a configuration like this in your web.config file :

<configuration>
  ...
  <system.web>
    <sessionState mode="InProc" timeout="30" />
  </system.web>
  ...
</configuration>

下面会话超时被设置为30分钟,例如

Here the session timeout is being set to 30 minutes, for example.

这篇关于如何增加会话超时在MVC 3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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