【发布时间】:2011-10-30 23:49:35
【问题描述】:
我正在尝试使用 ajax 重置 asp.net 会话,但它不起作用。我需要做什么来触发会话时间或 IIS 工作进程的重置
[WebMethod]
public static bool KeepAlive()
{
return true;
}
【问题讨论】:
我正在尝试使用 ajax 重置 asp.net 会话,但它不起作用。我需要做什么来触发会话时间或 IIS 工作进程的重置
[WebMethod]
public static bool KeepAlive()
{
return true;
}
【问题讨论】:
不完全确定,但我认为如果您使用这样的 WebMethod 属性,会话计时器将被触发:
[WebMethod(EnableSession=true)]
public static bool KeepAlive()
{
return true;
}
我会自己尝试一下,但我正在使用我的 mac atm...:P
【讨论】:
如果 EnableSession 为真,那么任何请求都会将会话重置为从头开始。但是,IIS 工作进程由应用程序池设置控制,无法由某种外部请求控制。
【讨论】: