gpt4 book ai didi

c# - 网站在 IIS 中运行时无法找到 DLL

转载 作者:太空宇宙 更新时间:2023-11-04 12:21:15 25 4
gpt4 key购买 nike

当我使用 VS 在本地运行网站时,一切正常。

我正在使用 P/Invoke 调用 dll 中的一个函数。 DLL 在 C++ 中并且可以工作。

当我在 IIS 上部署网站时,我收到错误消息

Unable to load DLL 'SolvingProbelm.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

dll 位于 bin 文件夹中。应用程序池是 Classic 和 .net 2.0

如有任何建议,我们将不胜感激。

问候

最佳答案

我曾经遇到过类似的问题。只需将 SolvingProbelm.dll 复制到 C:\WINDOWS\System32。希望它能奏效!它在我的情况下有效。实际上, native DLL 和 .Net DLL 的搜索方式不同。 IIS 也在 C:\Windows\System32 文件夹中搜索 native DLL。因此,在那里复制您的 DLL 可以解决问题!

关于c# - 网站在 IIS 中运行时无法找到 DLL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4948460/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com