Tutorial :Loading DLL from a /bin directory



Question:

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


Solution: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.


Solution:2

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.


Solution:3

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.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »