简体   繁体   中英

Loading DLL from a /bin directory

I have created a web project which references a class library project. 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:

can't find file “Documents and settings/….”

when trying to access the class DLL.

Is there a special setup to make the web pages look in its /bin directory?

Update: I am using .NET 1.1 and IIS settings are configured for .NET 1.1

sometimes the existence (or absense) of a web.config file in a virtual directory can cause wierd behavior that you've described. Also I've seen where a virtual directory will not look under virtual-directory/bin but rather under base/bin for the corresponding dll.

One reason could be, that the bin directory is not a direct subfolder of the directory which is marked as application. Check the IIS web settings to see, if your directory is an "application" directory and not a simple virtual directory of another application.

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). Check if you have the correct dotNET version set in IIS and all referenced libraries in the same folder.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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