如何增加或减少来自其他web配置文件的会话超时?
与我的方案一样,我必须为所有用户修复会话超时,但对于某些特定用户,我需要从代码中手动减少会话超时。
我尝试使用下面的代码设置会话超时,但它不起作用。
新建obj = FormsAuthenticationConfiguration FormsAuthenticationConfiguration();obj.Timeout = TimeSpan.FromMinutes(1);
发布于 2016-08-11 01:55:44
在Session_OnStart event上,您可以调用HttpContext.Current.Session.Timeout = 1;,如下所示:How can set different session timeout
https://stackoverflow.com/questions/38879300
复制相似问题