会话在几分钟内超时 [英] Session times out in just a few minutes
问题描述
我在母版页中获得了以下代码:
I''ve got the following code in a Master page:
if ((SubmitterRecord)Session["CurrentUser"] != null)
{
SubmitterRecord SubmitterRec = new SubmitterRecord();
SubmitterRec = (SubmitterRecord)Session["CurrentUser"];
LiteralLoggedIn.Text = SubmitterRec.UserID;
userpanel.Visible = true;
loginpanel.Visible = false;
}
else
{
loginpanel.Visible = true;
userpanel.Visible = false;
}
这在开发中已经完美"地工作了,但是当我在ISP的服务器上安装了该会话后,它似乎正在丢失会话状态.我可以登录"并离开该页面10分钟,然后转到另一个页面;当该页面显示它时,好像我还没有登录.我已经在两个不同的ISP(其中一个是godaddy.com)上安装了它,并遇到了同样的问题.我还在web.config中添加了sessionState timeout ="60",但这也无济于事.
任何帮助将不胜感激!
谢谢
Dennis Derringer
This has worked "flawlessly" in development but it seems to be losing the session state when I''ve installed this on my ISP''s servers. I can "login" and leave the page up for 10 minutes and then go to another page; when that page displays it''s as though I haven''t logged in. I''ve installed this on two different ISP''s (one of them godaddy.com) and get the same problem. I''ve also added sessionState timeout="60" in the web.config, but that doesn''t help either.
Any help would be appreciated!
Thank you,
Dennis Derringer
推荐答案
看看昨天提出的那个问题的答案.
在ASP.NET Web应用程序中会话超时自动 [ ^ ]
Look at those answers for that question which was asked yesterday.
session time out automatically in asp.net web application[^]
这篇关于会话在几分钟内超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!