简体   繁体   中英

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!

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"

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM