如何在IIS7中配置Delphi 2010 ISAPI.dll 64位? [英] how to configure Delphi 2010 ISAPI.dll in IIS7 64bit?

查看:156
本文介绍了如何在IIS7中配置Delphi 2010 ISAPI.dll 64位?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使ISAPI dll在IIS7中工作以进行查询所需的最小步骤是什么?www.website.com/test/bin/ISAPIGet.dll?a = b?请不要参考顶级谷歌搜索,它们是非常通用的,不工作。
我在Delphi2010中写了非常简单的ISAPIGet.dll,它在IIS5 Win2000中运行良好。然后我把它放在IIS7 SBS2008上,
进入C:\inetpub\wwwroot\website\test\bin文件夹。
为/网站创建的网站
/ test的
/ bin的虚拟目录,
在/ bin的HandlerMappings中添加脚本映射* .dll到我的ISAPIGet.dll,
允许我的dll在ISAPIandCgiRestrictions,
创建32位ApplicationPool非管理代码,经典模式,
绑定到/ test应用程序。
当查询www.website.com/test/bin/ISAPIGet.dll?a=b时,我遇到各种错误,如500,503(当AppPool失败时),而主页www.website.com正在工作精细。
我该怎么办?我需要配置web.config文件,哪里和如何?

what are minimal steps required to make ISAPI dll working in IIS7 for query www.website.com/test/bin/ISAPIGet.dll?a=b ? Please don't refer to top google searches, they are very generic and don't work. I wrote very simple ISAPIGet.dll in Delphi2010, which works great in IIS5 Win2000. Then I put it on IIS7 SBS2008, into C:\inetpub\wwwroot\website\test\bin folder. Created website for /website, Application for /test, VirtualDirectory for /bin, in HandlerMappings for /bin Added Script Map *.dll to my ISAPIGet.dll, allowed my dll in ISAPIandCgiRestrictions, created 32bit ApplicationPool NonManaged code, Classic mode, bound it to /test Application. When quering www.website.com/test/bin/ISAPIGet.dll?a=b I'm getting all kinds of errors like 500, 503 (when AppPool fails), while homepage www.website.com is working fine. What else should I do? Do I need to configure web.config file, where and how?

推荐答案

我记得我的ISAPI有类似的问题DLL在IIS7中运行在WinSvr2008R2(64b)上。我写下了一些快速笔记,以帮助我重复最终使其工作的步骤。我会尝试提供这些(至少我们做的)。

As I recall, I had similar problems getting our ISAPI DLL to run in IIS7 on WinSvr2008R2(64b). I wrote down some quick notes to help me repeat the steps that finally got it working. I'll try to provide those here (at least what we did).


  1. 授予读取和执行,列出文件夹内容,以及读取对IUSR的权限到文件夹 C:\PathToISAPI_DLL

  2. 将ISAPI DLL需要运行的所有DLL文件复制到 c:\windows\syswow64 文件夹(例如,midas.dll,dbxmss.dll等)

  3. 启动IIS管理器

  4. 添加应用程序池MyAppPool[无管理,经典,现在开始]

  5. 更改新的App Pool的高级设置允许32 -bit,加设置空闲超时

  6. 使用MyAppPool将一个应用程序MyApp添加到您的网站,并将物理路径设置为 C:\PathToISAPI_DLL

  1. Grant "Read & Execute, List folder contents, and Read" rights to IUSR to the folder C:\PathToISAPI_DLL
  2. Copy all DLL files that the ISAPI DLL needs to run into the c:\windows\syswow64 folder (e.g., midas.dll, dbxmss.dll, etc.)
  3. Start IIS Manager
  4. Add the app pool "MyAppPool" [no managed, classic, start now]
  5. Change "Advanced Settings" of new App Pool to allow 32-bit, plus set idle time-out
  6. Add an application "MyApp" to your website using "MyAppPool" and set the physical path to C:\PathToISAPI_DLL

现在,您必须在DOS提示符下执行几个步骤才能完成配置:

Now you have to do several steps at the DOS prompt to finish configuring things:

cd /d c:\windows\system32\inetsrv

REM *** Grant rights to execute the DLL ***
appcmd.exe set config -section:isapiCgiRestriction /+[path='C:\PathToISAPI_DLL\ISAPI.dll',allowed='true']

REM *** Grant the url of the Execute access for hander mappings ***
appcmd.exe set config "Default Web Site/MyApp/ISAPI.DLL" "/commit:Default Web Site/MyApp" /section:handlers /accessPolicy:Read,Script,Execute

REM *** Make sure you have an ISAPI module mapping for *.dll at that path ***
appcmd.exe list config "Default Web Site/MyApp" /section:handlers | findstr /i *.dll

这是笔记的范围。我已经成功地跟随了他们,一直有效。我只能使用永远不会使用GUI。我总是必须在DOS提示符下运行 appcmd 命令才能完成配置。

That's the extent of my notes. I have successfully followed them several times and it has always worked. I have never been able to get it work using just the GUI. I've always had to run the appcmd commands at a DOS prompt to finish configuring things.

有时我仍然看到404错误,在这种情况下,我从ISAPI.DLL文件夹中删除了web.config,并再次运行最后两个 appcmd 命令。当然,我的ISAPI DLL没有web.config文件中的任何其他设置,所以它不会伤害只是删除它...

Sometimes I still see a 404 error, in which case I delete the web.config from the folder with the ISAPI.DLL and run the last two appcmd commands again. Of course, my ISAPI DLL doesn't have any other settings in the web.config file so it doesn't hurt to just delete it...

这篇关于如何在IIS7中配置Delphi 2010 ISAPI.dll 64位?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆