c# - Check event log for IIS site stop/start from code -
what want see in event viewer
events iis site
stop/start.
so saw in event viewer
application , services logs
-> microsoft
->windows
->iis-configuration
, enabled logging.
now when start/stop iis site can see log there.
now trying run code:
var site = server.sites.firstordefault(s => s.name == websitename); if (site != null) { site.stop(); }
the site down, dont see logging in event viewer
, why , how can solve it?
Comments
Post a Comment