We have a system with a web app and a bunch of Windows Services doing some background work.
Whenever we need to make a more substantial change to the system, we end up having to issue an IIS Reset, and then manually restart all relevant Windows services.
Is there any way at all to be notified of such IISReset events in C# code, so that our Windows Services could restart themselves, whenever they detect such an IISReset command being executed?
Thanks!
Marc
You could also plug into Windows Instrumentation with you own custom Windows Query Language expression.
I’ve never used it for IIS directly, but I expect that there would be objects you can listen to, which lets you be aware of such changes.
You can check this out : http://www.csharphelp.com/archives2/archive334.html as a starting point for research.