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

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -