IIS 5 & IIS 6
can't use custom DLL after deploying website
Last post Nov 13, 2008 05:29 PM by tomkmvp
Nov 06, 2008 11:22 AM|j3rich0|LINK
Hello, I am currently working on a small website, this website uses a DLL that contains the classes to communicate with another server, this DLL was actually generated from a jar file using IKVM. So I referenced this DLL in my website Bin folder along with
the required IKVM files, and this worked fine in Visual Studio when debugging, everything is as it should be. However when I put this site up on IIS in both 6.0 and 7.0, it breaks. Specifically it returns a Null reference exception whenever I try to use an
object that was instantiated from the classes in the DLL. Now since the DLL has been tested properly and the code works fine in Visual studio, I can't help but think this is some sort of configuration error or something but I am new to IIS\ASP.NET, can anyone
guess as to what is happening? is it some sort of permissions error? some missing reference that I have to make or some IIS configuration that needs to be changed?
Nov 06, 2008 02:34 PM|murtaza_t|LINK
Is your application uploaded in the root of your website or in a sub folder..? If it is in a sub folder then you will have to create it as a virtual (application) directory.
Nov 06, 2008 04:10 PM|j3rich0|LINK
Sorry, can you explain what you mean by application? are you talking about the DLL files themselves?
this is how it is structured
my aspx files are in C:\inetpub\Website
and my DLLs are in C:\inetpub\Website\Bin
Nov 07, 2008 07:18 AM|murtaza_t|LINK
By Application I meant your project..
Anyways from your example it seems that it is not the problem I suggested. For some reasons the DDL is not picked up, it can be a problem with the DLL itself or permissions. you must have read & execute permissions for the application user (mostly NETWORK
SERVICE or ASPNET) on all the folders of your website.
Nov 07, 2008 07:37 AM|j3rich0|LINK
Hello, thank you for your response, I put the permissions on all the folders just like you said. unforunately the problem is not fixed. To give more detail, the error that I keep getting is this
System.NullReferenceException: Object reference not set to an instance of an object. at Fulfiller.toLog(String ) at Fulfiller.initialize(String str1, Int32 i, String str2, String str3) at Orders.createDataSource()
the app is unable to instantiate anything from the DLL, what the following method is supposed to do is initialize a connection to another server in order to retrieve product information, do you think that maybe IIS is somehow blocking any connection attempts
from being made and that is why it doesn't work?
Nov 12, 2008 09:57 PM|Andrew Zhu - MSFT|LINK
Agree with murtaza, it can be a problem with the DLL itself or permissions.
Can you call this dll from a Console Application?
Nov 13, 2008 04:53 PM|j3rich0|LINK
yes, the DLL works fine everywhere except when running in IIS, it works when used in a console application and when running on the Visual Studio development server
Nov 13, 2008 05:29 PM|tomkmvp|LINK
Since this is a programming issue you'll probaby get a better response over at