How to get event notification that a web site is started/stopped

How is it possible to get event notification in IIS that a web site started or stopped ?

Thanks,
Gilad.
gilad111397Asked:
Who is Participating?
 
OnegaZhangCommented:
I guess web site is monitored by separate thread. You can do some investigation in this direction, may install an ISAPI filter, handle THREAD_ATTACH/THREAD_DETACH event in DllMain.
0
 
lakshman_ceCommented:
When the Web service is stopped or unloaded, IIS calls TerminateFilter in all ISAPI filters as part of its shutdown sequence, for any filters that implemented and exported the function. TerminateFilter is typically used to perform cleanup and de-allocation of allocated resources.

GetFilterVersion is called exactly once, when the ISAPI filter is initially loaded. Any per-connection initializations the developer wants to perform must be managed internally within the context of the HttpFilterProc function call.

Find more details at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iissdk/html/22e3fbfb-1c31-41d7-9dc4-efa83f813521.asp
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.