托管DLL不能ASP.NET服务器上加载 [英] Unmanaged DLLs fail to load on ASP.NET server

查看:331
本文介绍了托管DLL不能ASP.NET服务器上加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此问题涉及到一个ASP.NET网站,最初开发于2005年VS现在在VS 2008中。

This question relates to an ASP.NET website, originally developed in VS 2005 and now in VS 2008.

本网站使用了哪些不是.NET 2非托管的外部dll和我没有源$ C ​​$ C编译它们并使用它们原样。

This website uses two unmanaged external DLLs which are not .NET and I do not have the source code to compile them and have to use them as is.

该网站运行在Visual Studio中精细,定位和正确地访问这些外部DLL。但是,当网站发布在一个Web服务器(捉迷藏IIS6和ASP.NET 2.0),而不是开发PC就无法找到和访问这些外部DLL,我也得到了以下错误:

This website runs fine from within Visual Studio, locating and accessing these external DLLs correctly. However, when the website is published on a webserver (runnning IIS6 and ASP.NET 2.0) rather than the development PC it cannot locate and access these external DLLs, and I get the following error:

无法加载DLL'XYZ.dll:指定的模块找不到。 (异常来自HRESULT:0x8007007E)

外部DLL位于网站的bin目录,随着管理的DLL包装他们和所有其他DLL的网站一起。

The external DLLs are located in the bin directory of the website, along with the managed DLLs that wrap them and all the other DLLs for the website.

搜索这个问题揭示了很多其他人似乎有从ASP.NET网站访问外部non.NET的DLL同样的问题,但我还没有发现有效的解决方案。

Searching this problem reveals that many other people seem to have the same problem accessing external non.NET DLLs from ASP.NET websites, but I haven't found a solution that works.

我曾尝试以下内容:


  • 运行很大程度上取决于检查依赖建立前三
    在路径中的System32目录,最后是在.NET 2
    框架。

  • 我把两个DLL和它们的依赖中
    SYSTEM32并重新启动服务器,但仍然网站
    无法加载这些外部的DLL。

  • 给予了充分的权利ASPNET,IIS_WPG和IUSR(用于服务器)
    该网站bin目录并重新启动,但网站还是没能
    加载这些外部DLL。

  • 增加了外部DLL作为现有项目的项目和集
    他们的复制到输出属性为始终复制,和网站
    仍然无法找到的DLL。

  • 同时设置其生成操作属性设置为嵌入的资源和
    网站仍然无法找到的DLL。

这个问题的任何援助将大大AP preciated!

Any assistance with this problem would be greatly appreciated!

推荐答案

尝试把DLL文件在\\ System32 \\ Inetsrv目录。这是IIS的Windows Server上的工作目录。

Try putting the dlls in the \System32\Inetsrv directory. This is the working directory for IIS on Windows Server.

如果这不起作用尝试把在System32目录下的DLL和依赖文件在Inetsrv目录。

If this doesn't work try putting the dlls in the System32 directory and the dependency files in the Inetsrv directory.

这篇关于托管DLL不能ASP.NET服务器上加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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