分享
 
 
 

isapi debug

王朝vc·作者佚名  2006-01-08
窄屏简体版  字體: |||超大  

HOWTO: Debug ISAPI DLLs Under IIS 4.0 and IIS 5.0 (Q183480)

The information in this article applies to:

Microsoft Internet Information Server 4.0

Microsoft Internet Information Services version 5.0

SUMMARY

Debugging of ISAPI Extensions and Filters under Internet Information Server (IIS) 4.0 is fully explained in the Microsoft Developer Network (MSDN) documentation. This documentation can be found in the following location: Platform SDK

Web Services

Internet Information Services SDK

Programmer's Guide

Developing ISAPI Extension and Filters

Debugging ISAPI Extensions and Filters

Please be aware that this documentation is not installed by the default installation option of NTOP or by adding IIS 5.0 to Windows 2000. However, it is available at the following link:

MSDN Online

MORE INFORMATION

Following are the steps for one method to debug an ISAPI Extension or Filter DLL. (It is assumed that Visual C++ is installed on the IIS computer.)

Build a debug version of the ISAPI DLL. By default, the Debug subdirectory of the project will now contain *.dll and two files with *.pdb extension (for example, c:\MyProj\debug directory).

Create a virtual root with execute permissions in the IIS Management Console and set its physical location to the project's debug directory (for example, "/MyProj" virtual root will be mapped to "c:\MyProj\Debug").

Make sure that W3SVC service is running. Start it, if necessary (you can use this command: "net start w3svc").

Start Microsoft Developer Studio. Go to the Build menu, click Start Debug , and click Attach Process . Select the Show System Processes option. In Windows 2000, sometimes no processes will appear in the process list (See Q235434 BUG: "Attach to Process" List Is Empty ). You can attach a debugger to a particular process by right-clicking it within the Task Manager processes tab and choosing debug .

In the list of running processes, select INETINFO .

From the Project menu, click Settings . Click the Debug tab. From the Category drop-down box, select Additional DLLs . At this point, you should see the message stating that DLLs symbols were loaded.

Add your ISAPI extension or filter DLL to the list.

From the File menu, click Open and bring up the source file for the DLL. Set a breakpoint in the source code and submit a request to IIS from the browser (for example, http://server/myproj/mydll.dll). If the debugger beeps and refuses to set the break point, the reason for this may be a mismatch between the DLL and PDB files. Rebuilding the DLL should help in this situation.

NOTE 1 : If the application is configured to run out-of-proc in IIS 4.0 (or on IIS 5.0 with medium or high Application Protection), then attaching debugger to Inetinfo.exe will not break execution of an Extension DLL. You will need to attach the debugger to the MTX.exe process (or DLLHOST.exe if using Windows 2000) that hosts the ISAPI DLL. Because there may be more than one MTX.exe (DLLHOST.exe) process running at one time, you may need to add code to the ISAPI DLL that shows the process ID (PID) that the DLL is loaded in. After the PID is known, you can attach the debugger to the MTX (DLLHOST) with corresponding PID. You can use this code: #define _WIN32_WINNT 0x0400

#ifdef _DEBUG

char szMessage [256];

wsprintf (szMessage, "Please attach a debbuger to the process 0x%X

(%s) and click OK",

GetCurrentProcessId(), argv[0]);

MessageBox(NULL, szMessage, "ISAPI/Filter Debug Time!",

MB_OK|MB_SERVICE_NOTIFICATION);

#endif

Also, please note that medium Application Protection is a default setting of the IIS 5.0.

NOTE 2 : For debugging purposes it may be either to configure IIS 5.0 application to run with low Application Protection. This will allow attaching debugger directly to inetinfo.exe process.

REFERENCES

Windows NT 4.0 Options Pack online documentation

MSDN Online Documentation

Published

Apr 10 1998 4:17PM

Issue Type

kbhowto

Last Modifed

Sep 12 2001 3:22PM

Additional Query Words

Keywords

kbASP kbDebug kbiis400 kbiis500

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有