Search code examples
iis-7iis-7.5iis-8

When does IIS call CGlobalModule::OnGlobalApplicationResolveModules?


I have created a native module for IIS 7, 7.5 and 8.0. The module is registered within the IIS configuration and is loaded when an application pool is initialized.

The module's RegisterModule export, creates and registers a descendant of CGlobalModule using the supplied IHttpModuleRegistrationInfo instance.

The CGlobalModule descendant is registered for GL_APPLICATION_RESOLVE_MODULES, GL_APPLICATION_STOP and GL_STOP_LISTENING.

The module's OnGlobalApplicationResolveModules method has been given "first" priority during registration.

During a request and when the IIS application pool is recycled, the global module receives the GL_APPLICATION_STOP and GL_STOP_LISTENING requests as expected. Unfortunately, the OnGlobalApplicationResolveModules method is not called under any circumstances that I have been able to determine.

The CGlobalModule documentation and sample code on the MSDN do not indicate under what circumstances the OnGlobalApplicationResolveModules method is called.

Has anyone successfully used the OnGlobalApplicationResolveModules notification? If so, in what circumstances is it executed?


Solution

  • The GL_APPLICATION_RESOLVE_MODULES notification is only sent if the application pool is configured to use .Net Framework 4.0.