Is there a way I can determine how long an application pool (in IIS7) has been up (time since started, or last restart) in c#?
Now to view any Application Pool recycle events, simply open the Event Viewer and click on the standard System event log.
To change it using GUI: II S Manager | Application Pools | Select App Pool -> Advanced Settings | Generate Recycle Event Log Entry. Save this answer. Show activity on this post. Go to Logging and ensure either ETW event only or Both log file and ETW event ...is selected.
Seems its usual thing it takes some time to start with new process. But our case it takes around 15-20 mins to getting the palliation up or recycle process to complete.
To enable it using the IIS Manager go to: Application Pools > Select Application Pool > Advanced Settings and you should find: Generate Recycle Event Log Entry.
DateTime.Now - Process.GetCurrentProcess().StartTime
Process.GetCurrentProcessInfo()
doesn't exist.
Really stupid trick: in some class that everything uses, use a class constructor to remember your start time and use an aspx page to receive it. Now compare to current time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With