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:
Open IIS Manager
Go application pools.
Select the application pool, right-click and select "Advanced Settings".
Under Recycling, Expand "Generate Recycle Event Log Entry"