How to debug an ISAPI Filter?
ISAPI Filters are dll's that get attached to the w3wp pr开发者_开发百科ocess of IIS web server. ISAPI Filters have to compulsorily export two functions viz. HttpFilterProc and GetFilterVersion. I have written one such filter but it is not working in the way that the switch case in HttpFilterProc is not getting activated. What can i do to check whats wrong here ?
Add a call to DebugBreak in your HttpFilterProc and build your DLL in debug mode before adding it as ISAPI filter.
If your HttpFilterProc gets called, windows would popup a message to debug the process.
If it doesn't your DLL is not getting loaded. You need to check why it is not. Some reasons may be:
- The ISAPI filter is configured with different bitness as compared to the application pool bitness.
- You have not registered for any ISAPI events in your GetFilterVersion function. See list of ISAPI events here.
精彩评论