我認爲我的計時器在一段時間後停止工作,我剛剛測量了20分鐘,並發現了其他任何導致停止的事情。如果垃圾被收集起來,我應該如何聲明它,以便它不是?定時器在webservice中20分鐘後停止工作
[WebMethod, SoapHeader("spAuthenticationHeader")]
public void startStreaming()
{
if (Globals._streamTimer == null)
Globals._streamTimer = new System.Threading.Timer(handleStream, null, 0, 30000);
return Globals._returnValue;
}
public static class Globals
{
public static System.Threading.Timer _streamTimer = null;
}
什麼會話時間設置爲在服務器上? – BugFinder
IIS在應用程序池(高級設置)上有一個默認爲20分鐘的空閒超時設置...巧合? – BlueChippy