How can I attach the Delphi debugger to 64-bit IIS 7.5?

本小妞迷上赌 提交于 2021-02-18 22:20:46

问题


I'm running Delphi XE on Windows 7 Pro 64 and IIS 7.5, developing an ISAPI application. IIS is configured correctly (including allowing 32-bit code to run in an ISAPI process). The ISAPI process runs properly.

In Delphi I'm trying to attach to the ISAPI process running on localHost to step through my ISAPI.dll code: Run->Attach to Process->InetInfo.exe.

I've done this a thousand times with Windows XP and IIS 5, but in this new environment I cannot attach to the ISAPI process. I get an error message in the IDE when attempting to attach:

Unable to create process - the request is not supported

This is costing me lots of time — I have to pump out debug strings for every line of code, run the app, and then look at my debug strings, etc.

Why can't I attach to the ISAPI process? Is this is an IIS 7.5 configuration issue? Perhaps related to 32/64-bit problems because IIS is native 64-bit and Delphi debugger is 32-bit?


回答1:


Learn it here, http://blogs.msdn.com/b/david.wang/archive/2006/06/21/isapi-filter-and-the-iis6-process-model.aspx

To make it clear, in iis worker process isolation mode, w3wp.exe is the process that loads your isapi filters, so you should attach to it instead of inetinfo.exe.




回答2:


You might wanna check this out: http://www.embarcadero.com/products/delphi/64-bit




回答3:


If IIS 64bit is using an ISAPI.DLL which is a 32-bit module, it must be using an 32bit loader process. You could use ProcessExplorer to find which process is loading your ISAPI.DLL and attach Delphi to that process.




回答4:


You can debug your 32 bit ISAPI dll on a x64 bit machine by setting the "Enable 32 bit application" to true in the advanced app pool settings in IIS 7.5.

In Delphi you specify the "C:\Windows\System32\inetsrv\w3wp.exe" as the host application with the params "-debug". Start the Delphi IDE as admin and off you go. If you need more control over how w3wp is started you figure out available options using the command C:\Windows\System32\inetsrv\w3wp.exe -?

Hope this helps!




回答5:


You can debug your Delphi ISAPI Web Application under IIS 7.5 with the following tool http://www.eggcentric.com/ISAPIDebug.htm. (You will need to set up the ISAPIFwd.ini file)



来源:https://stackoverflow.com/questions/5899773/how-can-i-attach-the-delphi-debugger-to-64-bit-iis-7-5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!