I have found something irritating and I do not know if we can do something about it. If your application pool is set to 1740, the default, which is 29 hours. You will see that your application is restarted at expiration.
IIS returns a messages such as:
HostingEnvironment initiated shutdown
HostingEnvironment caused shutdown
The trace is:
at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
at System.Environment.get_StackTrace()
at System.Web.Hosting.HostingEnvironment.InitiateShutdownInternal()
at System.Web.Hosting.HostingEnvironment.UnregisterRunningObjectInternal(IRegisteredObject obj)
at System.Web.Hosting.HostingEnvironment.UnregisterObject(IRegisteredObject obj)
at System.Web.Hosting.ISAPIRuntime.StopProcessing()
This remains as is even if you send a new version. Thus, if you send a new version, which will generate a compilation, IIS doesn't reset the count on the application pool recycle event. Thus, if you upload a new version at the 15th hour, in 14 hours, there will still be a recycle. The fact that we upload a new version doesn't reset the actual monitoring of when a recycle is being scheduled.
Comment?