Home > front end >  How to log to event viewer when Default Web Site restarted in IIS?
How to log to event viewer when Default Web Site restarted in IIS?

Time:10-06

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!

CodePudding user response:

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

  • Related