If you want to discard the extra variable, I think this will give you the last time the IIS workflow (aka application pool) was restarted:
System.Diagnostics.Process.GetCurrentProcess().StartTime
I use it to set caching because the page is based on the content that I dynamically generate when the application starts:
Response.Cache.SetLastModified(System.Diagnostics.Process.GetCurrentProcess().StartTime);
You can stop / start individual websites within the application / workflow pool, but I exit this post that it does not recreate the static objects of the application, so I understand that the date associated with the workflow is probably the most useful date here.
Remember also that the static application variable created when the application was launched actually actually gives you the time when the application was first visited. Perhaps the workflow was started much earlier, and this takes into account phrases such as “warm up IIS applications” and “autostart IIS applications”, as well as another discussion of when static fields are initialized as a whole. What you choose may depend on whether you are interested in the last time the workflow was processed or if you are interested in how long the other static members were calculated.
source share