部署在 IIS 上时找不到组件,但运行 ASP 开发服务器时发现组件
我们有一个 VB.net 应用程序正在从一个盒子移动到另一个盒子。它在旧盒子上运行得很好。新盒子的配置与旧盒子相同,但硬件较新。当我在新服务器上运行该应用程序时,它抱怨找不到我们使用的 adobe 工具包。
错误信息是。
Compiler Error Message: BC30002: Type 'FDFACXLib.FdfApp' is not defined.
on the line:
Dim FdfAcx As FDFACXLib.FdfApp
FDFACX.DLL 和其他关联的 dll 位于 c:\inetpub\wwwroot\bin 目录中。我检查了文件的权限,ASP 用户具有对它们的完全访问权限。我还用 regsvr32 注册了它们。
Visual Studio 安装在新机器上,如果我使用内置开发服务器运行该项目,一切都会运行良好(设置了对 FDFACX.dll 的引用)。
IIS 似乎无法引用该 dll。我现在不知道还能尝试什么。有什么建议吗?
We have an VB.net application that is being moved from one box to another. It runs great on the old box. The new box is configured the same as the old one but is on newer hardware. When I run the application on the new server it complains that the adobe toolkit that we use can not be found.
The error message is.
Compiler Error Message: BC30002: Type 'FDFACXLib.FdfApp' is not defined.
on the line:
Dim FdfAcx As FDFACXLib.FdfApp
The FDFACX.DLL and other associated dlls are in the c:\inetpub\wwwroot\bin directory. I checked permissions on the files and the ASP user has full access to them. I also registered them with regsvr32.
Visual studio is installed on the new box and if I run the project using the built in development server everything runs great (references to FDFACX.dll are set).
It appears that IIS can't reference the dll. I don't know what else to try at this point. Any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
64 位进程无法加载 32 位库。也许 .NET 应用程序正在 64 位模式下运行?如果应用程序在新的 x64 机器上运行,则默认情况下它很可能在 IIS 中的 64 位应用程序池中运行。应用程序池是运行一个或多个 IIS 应用程序的工作进程。 64 位应用程序池作为 64 位进程,无法加载 32 位库。因此,在 IIS 中,您需要创建一个新的 32 位应用程序池,然后更新运行 .NET 应用程序的 IIS 应用程序以使用新的 32 位应用程序池而不是默认应用程序池。
打开 IIS 7 管理器。导航到您的网站。在右侧栏中,单击基本设置,您将在其中找到该网站的应用程序池的名称(默认情况下为 DefaultAppPool)。然后在导航中转到应用程序池,选择正确的应用程序池,然后单击右侧的高级设置。如果启用 32 位应用程序设置为 false,则它是 64 位。对于 IIS 应用程序正在使用的应用程序池,“启用 32 位应用程序”必须设置为 true。
A 64-bit process cannot load 32-bit libraries. Perhaps the .NET application is running in 64-bit mode? If the application is running on a new x64 box, then most likely it is running in, by default, a 64-bit application pool in IIS. An application pool is a worker process that runs one or more of your IIS applications. A 64-bit application pool, being a 64-bit process, cannot load 32-bit libraries. So in IIS, you need to create a new 32-bit application pool and then update the IIS application running your .NET application to use the new 32-bit application pool instead of the default application pool.
Open IIS 7 Administrator. Navigate to your website. In the right side bar, click Basic Settings, where you will find the name of the application pool for that website (by default, it is DefaultAppPool). Then in the navigation go to Application Pools, select the correct application pool, and click Advanced Settings on the right. If Enable 32-Bit Applications is set to false, then it is 64-bit. Enable 32-Bit Applications must be set to true for the application pool that your IIS application is using.
只是为了搞笑,将带有 dll 的目录添加到您的路径中?
Just for chuckles, add the directory with the dll to your path?