【发布时间】:2014-04-03 10:42:06
【问题描述】:
所以我让用户无缘无故地断开连接(或者更好的是我不知道原因)。
在登录页面上我创建一个会话:
Session.Add("UserProfile", username);
在着陆页上
string userNames = Session["UserProfile"] as string;
if(userNames == null){
Response.Redirect("~/default.cshtml");
}
在 Webconfig 我试过这个
<sessionState cookieless="UseCookies" timeout="240"> </sessionState>
<httpRuntime maxRequestLength="252400" executionTimeout="1200" />
<authentication mode="Forms"> <forms timeout="525600" slidingExpiration="true" /></authentication>
问题是...在登录页面上,我有一个列表,用户可以在其中选择一个 ID,然后在上面输入,每个 ID 都有一个用户可以编辑的表单。
但很多时候,当用户提交表单时,他会被重定向到登录页面。
有什么想法吗?
【问题讨论】: