问题
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