简体   繁体   English

从/ bin目录加载DLL

[英]Loading DLL from a /bin directory

I have created a web project which references a class library project. 我创建了一个引用类库项目的Web项目。 When deployed to the local machine the web/classes all work fine but deployed on a 'shared' IIS site, the class DLLs exist in the /bin directory, but the web page generates the following error: 当将Web /类部署到本地计算机上时,所有Web /类都可以正常工作,但部署在“共享” IIS站点上,则类DLL存在于/ bin目录中,但是网页会生成以下错误:

can't find file “Documents and settings/….” 找不到文件 “文档和设置/…”。

when trying to access the class DLL. 尝试访问类DLL时。

Is there a special setup to make the web pages look in its /bin directory? 是否有特殊的设置可以使网页在/ bin目录中显示?

Update: I am using .NET 1.1 and IIS settings are configured for .NET 1.1 更新:我正在使用.NET 1.1,并且为.NET 1.1配置了IIS设置

sometimes the existence (or absense) of a web.config file in a virtual directory can cause wierd behavior that you've described. 有时,虚拟目录中web.config文件的存在(或缺少)可能会导致您描述的异常行为。 Also I've seen where a virtual directory will not look under virtual-directory/bin but rather under base/bin for the corresponding dll. 我也看到虚拟目录不会在virtual-directory / bin下出现,而是在相应的dll的base / bin下出现。

One reason could be, that the bin directory is not a direct subfolder of the directory which is marked as application. 一个原因可能是bin目录不是该目录的直接子文件夹 ,该目录被标记为application。 Check the IIS web settings to see, if your directory is an "application" directory and not a simple virtual directory of another application. 检查IIS Web设置以查看您的目录是否是“应用程序”目录,而不是另一个应用程序的简单虚拟目录

Another reason could be that the version of the assembly deployed doesn't correspond to the assembly used as reference in the other assembly. 另一个原因可能是所部署的程序集的版本与另一个程序集中用作参考的程序集不对应。

Check also the security settings on that file on your server. 还要检查服务器上该文件的安全设置。

No by defauls IIS looks for DLL's in the Project/bin folder (not the /bin/Debug). IIS不会在Project / bin文件夹(而不是/ bin / Debug)中查找DLL。 Check if you have the correct dotNET version set in IIS and all referenced libraries in the same folder. 检查您是否在IIS中设置了正确的dotNET版本,以及是否在同一文件夹中设置了所有引用的库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM