iis-docs
iis-docs copied to clipboard
CGlobalModule::OnGlobalFileChange example doesnt work
Whilst attempting to develop a native IIS module I've been having some issues triggering CGlobalModule::OnGlobalFileChange described in CGlobalModule::OnGlobalFileChange Method I've built a new module using the example code on the above page (which appears to match https://github.com/MicrosoftDocs/iis-docs/blob/43e4adc69be5275b831114388c09ca10e4288d88/samples/snippets/cpp/VS_Snippets_IIS/IIS7/IGlobalFileChangeProviderGetFileName/cpp/IGlobalFileChangeProviderGetFileName.cpp however no matter what I do, the OnGlobalFileChange function is never called. OnGlobalPreBeginRequest is called so I know my module is registered correctly.
Things I've tried to trigger the event have included:
- Creating a new file in the web root
- Creating a file via an ASP page
- Creating a file under inetsrv
Based on the above URLs description of this event of IIS will call the module's OnGlobalFileChange method when a file within the scope of a Web site is changed. it sounds like the first two tests I performed should have triggered this event.
So is the OnGlobalFileChange event still in IIS or has it been disabled and the documentation not updated? Or am I misunderstanding what this event does and how to trigger it?