如何增加会话的超时持续时间 [英] How to increased timeout duration of session

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

问题描述

您好,



我在web.config文件中写下以下代码以增加会话超时

Hello,

I write a following code in web.config file to increased a timeout of session

<sessionstate mode="InProc" timeout="120"/>



但是大部分时间都不行。

在服务器上载网站后,它根本不起作用。

我搜索互联网,但它发现这是一个问题,一般发生在会话模式=InProc请帮助。



我尝试过:



我在web.config文件中写下以下代码以增加会话超时


but it is not work most of time.
After uploading website on server it is not at all work.
I search of internet but it seen that it is a problem generally occurred with session mode="InProc" please help.

What I have tried:

I write a following code in web.config file to increased a timeout of session

<sessionstate mode="InProc" timeout="120"/>

推荐答案

正如评论中所提到的,有几件事可能会导致会话丢失。您在IIS中的应用程序池上的空闲超时可能会导致它。如果您的代码正在更改web.config,您的会话将被重置。如果你要使用新的代码,你也会失去你的会话。



你需要解决你的会话重置的原因。我还想听听你为什么认为会议正在重置。
As mentioned in the comments, there are several things that can cause sessions to get lost. Your idle timeout on the app pool in IIS may be causing it. If you have code that is changing web.config your sessions will get reset. If you are putting new code in place you'll also lose your sessions.

You'll need to troubleshoot why your session is getting reset. I'd also like to hear why you think the session is being reset.


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

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