Identify the last time the application pool redesigned

I am writing a .NET service that monitors application pools. based on certain triggers, I restart them. However, I do not want to restart them if the trigger occurred before they were recycled for the last time. How to find out "recent reuse" in the application pool?

+5
source share
2 answers

If a property is set LogEventOnRecycle, you should be able to read this information from the event log usingEventLog Class

+2
source

, , , , , .

Process.GetCurrentProcess().StartTime
0

All Articles