SoFunction
Updated on 2025-04-08

Solution to the problem of timed execution program stopping in Application_Start in IIS application pool recycling


void Application_End(object sender, EventArgs e)
{
// Code running when the application is closed
//Solve the problem of application pool recycling
(5000);
string strUrl = "Website Address";
_HttpWebRequest = ()(strUrl);
_HttpWebResponse = ()_HttpWebRequest.GetResponse();
_Stream = _HttpWebResponse.GetResponseStream();//Get the written back byte stream
}