scottmeyer
scottmeyer

Reputation: 23

How to log to event viewer when Default Web Site restarted in IIS?

I have an ASP.NET web page running under IIS. I have a requirement where I need to log to event viewer when the webpage is restarted through IIS manager. I am not sure if this can be done through ASP.NET or can I turn on some options in IIS to capture the restart? Please help!

Upvotes: 2

Views: 1386

Answers (1)

Malvik Bhavsar
Malvik Bhavsar

Reputation: 440

In IIS Manager check the following configuration:

  1. Open IIS Manager

  2. Go application pools.

  3. Select the application pool, right-click and select "Advanced Settings".

  4. Under Recycling, Expand "Generate Recycle Event Log Entry"

enter image description here

Upvotes: 1

Related Questions