I have an IIS7 Native Module which uses the application pool ID for most transactions. However there is one piece of production code that invokes
IHttpUser* user = m_pHttpContext->GetUser();
impersonationTokenHANDLE = user->GetImpersonationToken();
In IIS6 an equivalent Isapi extension DLL was invoked via a web application path that used "Connect As" to ensure the user was always account X. But in IIS7 the individual user account is obtained and used and failing for my purpose. But I don't see how in IIS7 to emulate the "Connect As" trick used in the past. The Native Module is not tied to any web path as ISAPI was so how can I change the user identity (after authenticating) to a fixed ID via IIS configuration?
I know how to fix this in code but I'm looking at a production issue and am hoping for a configuration solution for our field engineers.