• 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 ?

Thanks,
Gilad.
0
gilad111397
Asked:
gilad111397
2 Solutions
 
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

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