开发者

How to debug an ISAPI Filter?

开发者 https://www.devze.com 2023-04-03 01:54 出处:网络
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 hav

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:

  1. The ISAPI filter is configured with different bitness as compared to the application pool bitness.
  2. You have not registered for any ISAPI events in your GetFilterVersion function. See list of ISAPI events here.
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号