会话超时asp.net IIS7 Godaddy的? [英] Session timeout asp.net iis7 Godaddy?

查看:523
本文介绍了会话超时asp.net IIS7 Godaddy的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这是一个常见的​​问题,但我已经尝试了各种建议,我发现,其中没有一个似乎为我工作。

I know this is a common problem, but I've tried every suggestion I've found and none of them seems to work for me.

我在Godaddy的一个Windows服务器租用。我在asp.net开发的Web站点。我想增加会话超时(而不是应用程序超时),意思是,我希望会话持续更长的时间。

I have a Windows Dedicated Server in Godaddy. I have a Web site developed in asp.net. I want to increase the session timeout (not the application timeout), meaning, I want sessions to last longer.

我已经尝试通过增加内

<sessionState timeout="60"></sessionState>

和我试图通过这篇文章改变之后在IIS中该值:

And I've tried changing this value in iis by following this article:

http://technet.microsoft.com /en-us/library/cc725820(v=ws.10).aspx

在我的Web.config文件中的身份验证部分如下所示:

The authentication section in my web.config file is as follows:

<authentication mode="Windows"/>

这些选项都不似乎工作。会话的值是5分钟后(或更少)空。我登录了,等了近6分钟,并试图访问另一个页面时,会话值为空。

None of these options seems to work. The session values are null after 5 mins (or less). I've logged in, waited almost 6 minutes, and when tried to access another page, the Session value was null.

任何帮助将大大AP preciated。

Any help would be greatly appreciated.

推荐答案

试试这个在全球ASAX文件

try this in the global asax file

void Session_Start(object sender, EventArgs e) 
    {
        // Code that runs when a new session is started
        Session.Timeout = Your Number here;
    }

这篇关于会话超时asp.net IIS7 Godaddy的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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