无法在模块DLL中找到RegisterModule入口点... - 发生了什么?

时间:2022-10-27 21:47:19

I have an ISAPI module (native - NO ASP.net etc) written in Delphi XE. Trying to run it on IIS 7.5 on a Win 7 64 enterprise desktop machine.

我有一个用Delphi XE编写的ISAPI模块(本机 - 没有ASP.net等)。尝试在Win 7 64企业桌面计算机上的IIS 7.5上运行它。

App pool, webSite, etc are configured correctly, ISAPI module is permissioned to execute, classic pipeline, 32 bit etc - have performed these operations many times.

App pool,webSite等配置正确,ISAPI模块被允许执行,经典流水线,32位等 - 已多次执行这些操作。

Same module runs fine on a Win 2008 R2 server and it USED to run on my Win 7 desktop IIS 7.5 as well.

相同的模块在Win 2008 R2服务器上运行良好,并且也可以在我的Win 7桌面IIS 7.5上运行。

But my hard drive died last week and I got a new Win 7 installation - the standard corporate wide Win 7 Enterprise image (not the same as my previous Win 7 64 installation).

但我的硬盘驱动器在上周死亡,我得到了一个新的Win 7安装 - 标准企业级Win 7企业级映像(与我之前的Win 7 64安装不同)。

Now when launching the module, browser hangs a bit and then returns "HTTP Error 503. The service is unavailable." In IIS, I see that my app pool is stopped after the error occurs - which I know means a serious error occurred in the web application.

现在,在启动模块时,浏览器会挂起一点,然后返回“HTTP错误503.服务不可用”。在IIS中,我看到我的应用程序池在发生错误后停止 - 我知道这意味着Web应用程序中发生了严重错误。

In the windows event log I found this message:

在Windows事件日志中,我发现了以下消息:

"Failed to find the RegisterModule entrypoint in the module DLL G:\Mikey.dll. The data is the error."

“无法在模块DLL G:\ Mikey.dll中找到RegisterModule入口点。数据是错误。”

Some debug strings showed me the error surfaces after application.run is called in the DLL dpr.

在DLL dpr中调用application.run之后,一些调试字符串向我显示了错误表面。

What's going on here? How can I fix this? I need this deployment for my development work.

这里发生了什么?我怎样才能解决这个问题?我的开发工作需要这个部署。

Please - the dll is properly permissioned to execute code and the app pool is properly configured - a good deal of my initialization code executes in the DLL BEFORE application.run is called - so this is not a simple configuration or permissions issue - the 503 error and the event log entry also indicate such.

请 - dll被正确许可执行代码并且应用程序池已正确配置 - 我的初始化代码大量执行在DLL BEFORE application.run被调用 - 所以这不是一个简单的配置或权限问题 - 503错误并且事件日志条目也表明了这一点。

2 个解决方案

#1


0  

I found the clue to my problem @

我发现了问题的线索@

http://forums.iis.net/p/1162012/1921878.aspx

**

Re: Messed-up site configuration; "Failed to find the RegisterModule ..." error in Event Log 10-22-2009, 8:48 PM Remove aspnet_isapi.dll from your modules list - it is an ISAPI extension, not a module. Anil Ruia Senior Software Design Engineer IIS Core Server

Re:搞砸网站配置;事件日志10-22-2009,8:48 PM中的“找不到RegisterModule ...”错误从模块列表中删除aspnet_isapi.dll - 它是ISAPI扩展,而不是模块。 Anil Ruia高级软件设计工程师IIS核心服务器

**

Realized that when initially I installed IIS, I did not see the CGI/ISAPI restrictions applet and permissioned my dll in a different fashion.

意识到最初我安装IIS时,我没有看到CGI / ISAPI限制小程序,并以不同的方式许可我的dll。

Later I found that I had to install the ISAPI support specifically - when I did that I permissioned my DLL again, the right way, and deleted the original module entry (or so I thought).

后来我发现我必须专门安装ISAPI支持 - 当我这样做时,我以正确的方式再次允许我的DLL,并删除原始模块条目(或者我认为)。

This page tipped me off - my dll was probably registered/permissioned incorrectly and IIS was running it as module, not an extension - thus: " "Failed to find the RegisterModule".

这个页面让我失望 - 我的dll可能被错误地注册/许可,IIS将其作为模块运行,而不是扩展 - 因此:“”找不到RegisterModule“。

Since this is brand new deployment, I simply uninstalled all IIS modules and features, made sure there were no old config files left around and scrubbed down the registry.

由于这是全新的部署,我只是卸载了所有IIS模块和功能,确保没有旧的配置文件,并清理注册表。

Then I reinstalled IIS with the ISAPI restriction feature included and registered/permissioned my ISAPI module as required and set up the app pool and web site. Now all is well.

然后我重新安装了IIS,其中包含了ISAPI限制功能,并根据需要注册/许可了我的ISAPI模块,并设置了应用程序池和网站。现在一切都很好。

Thank you Anil Ruia (wherever you are...)

谢谢你Anil Ruia(无论你在哪里......)

#2


0  

I was getting this error with a Perl module. I had to disable it from applicationHost.config. I found out that if you just edit %Windir%\system32\inetsrv\config\applicationHost.config with an editor, the changes aren't reflected on IIS, even though the file gets written correctly, even if you restart IIS. The only way to do it is following this guide https://technet.microsoft.com/en-us/library/cc735153(v=ws.10).aspx. You basically need to launch "Notepad" from en elevated command prompt to edit applicationHost.config. That's how I solved this problem.

我用Perl模块得到了这个错误。我不得不从applicationHost.config中禁用它。我发现如果您只使用编辑器编辑%Windir%\ system32 \ inetsrv \ config \ applicationHost.config,即使文件编写正确,即使重新启动IIS,也不会在IIS上反映更改。唯一的方法是遵循本指南https://technet.microsoft.com/en-us/library/cc735153(v=ws.10).aspx。您基本上需要从提升的命令提示符启动“记事本”来编辑applicationHost.config。这就是我解决这个问题的方法。

#1


0  

I found the clue to my problem @

我发现了问题的线索@

http://forums.iis.net/p/1162012/1921878.aspx

**

Re: Messed-up site configuration; "Failed to find the RegisterModule ..." error in Event Log 10-22-2009, 8:48 PM Remove aspnet_isapi.dll from your modules list - it is an ISAPI extension, not a module. Anil Ruia Senior Software Design Engineer IIS Core Server

Re:搞砸网站配置;事件日志10-22-2009,8:48 PM中的“找不到RegisterModule ...”错误从模块列表中删除aspnet_isapi.dll - 它是ISAPI扩展,而不是模块。 Anil Ruia高级软件设计工程师IIS核心服务器

**

Realized that when initially I installed IIS, I did not see the CGI/ISAPI restrictions applet and permissioned my dll in a different fashion.

意识到最初我安装IIS时,我没有看到CGI / ISAPI限制小程序,并以不同的方式许可我的dll。

Later I found that I had to install the ISAPI support specifically - when I did that I permissioned my DLL again, the right way, and deleted the original module entry (or so I thought).

后来我发现我必须专门安装ISAPI支持 - 当我这样做时,我以正确的方式再次允许我的DLL,并删除原始模块条目(或者我认为)。

This page tipped me off - my dll was probably registered/permissioned incorrectly and IIS was running it as module, not an extension - thus: " "Failed to find the RegisterModule".

这个页面让我失望 - 我的dll可能被错误地注册/许可,IIS将其作为模块运行,而不是扩展 - 因此:“”找不到RegisterModule“。

Since this is brand new deployment, I simply uninstalled all IIS modules and features, made sure there were no old config files left around and scrubbed down the registry.

由于这是全新的部署,我只是卸载了所有IIS模块和功能,确保没有旧的配置文件,并清理注册表。

Then I reinstalled IIS with the ISAPI restriction feature included and registered/permissioned my ISAPI module as required and set up the app pool and web site. Now all is well.

然后我重新安装了IIS,其中包含了ISAPI限制功能,并根据需要注册/许可了我的ISAPI模块,并设置了应用程序池和网站。现在一切都很好。

Thank you Anil Ruia (wherever you are...)

谢谢你Anil Ruia(无论你在哪里......)

#2


0  

I was getting this error with a Perl module. I had to disable it from applicationHost.config. I found out that if you just edit %Windir%\system32\inetsrv\config\applicationHost.config with an editor, the changes aren't reflected on IIS, even though the file gets written correctly, even if you restart IIS. The only way to do it is following this guide https://technet.microsoft.com/en-us/library/cc735153(v=ws.10).aspx. You basically need to launch "Notepad" from en elevated command prompt to edit applicationHost.config. That's how I solved this problem.

我用Perl模块得到了这个错误。我不得不从applicationHost.config中禁用它。我发现如果您只使用编辑器编辑%Windir%\ system32 \ inetsrv \ config \ applicationHost.config,即使文件编写正确,即使重新启动IIS,也不会在IIS上反映更改。唯一的方法是遵循本指南https://technet.microsoft.com/en-us/library/cc735153(v=ws.10).aspx。您基本上需要从提升的命令提示符启动“记事本”来编辑applicationHost.config。这就是我解决这个问题的方法。