• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 140
  • Last Modified:

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 ?

2 Solutions
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.
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

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now