And this time no one again visit the site, the results in the application_start of the timing of the execution of the program code will not be carried out, search on the Internet, found a solution, now and everyone to share the communication, the principle is to send a Web request at the end of the application site to visit, Start Application_Start.
Copy Code code as follows:
void Application_End (object sender, EventArgs e)
{
Code that runs when the application shuts down
Resolving Application Pool Recycling issues
System.Threading.Thread.Sleep (5000);
String strURL = "web address";
System.Net.HttpWebRequest _httpwebrequest = (System.Net.HttpWebRequest) System.Net.WebRequest.Create (strURL);
System.Net.HttpWebResponse _httpwebresponse = (System.Net.HttpWebResponse) _httpwebrequest.getresponse ();
System.IO.Stream _stream = _httpwebresponse.getresponsestream ();//get writeback byte stream
}