Link to home
Start Free TrialLog in
Avatar of rpatoriya
rpatoriya

asked on

File or assembly name ADODB, or one of its dependencies, was not found.

Hi,

I am having trouble in deploying web application. Development was done using vb.net,asp.net,MSSql AND  Crytal Report 10.0. I made a build to the development server and then move all aspx, rpt files and bin folder to the production server. Production server is running latest framework version and crystal report 10.

BUT...

When I try to access the page which has the crystal report call, it gives following error.
----------------------------------------------------------------------------------------------------------------------------------------------
File or assembly name ADODB, or one of its dependencies, was not found.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileNotFoundException: File or assembly name ADODB, or one of its dependencies, was not found.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'ADODB' could not be loaded.

Stack Trace:


[FileNotFoundException: File or assembly name ADODB, or one of its dependencies, was not found.]
   CrystalDecisions.CrystalReports.Engine.ReportDocument.(Object C) +0
   CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSource(Object dataSet) +21
   nyclaw.comps.web.IEYearlyForm.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\nyclaw.comps_4_1\IEYearlyForm.aspx.vb:78
   System.Web.UI.Control.OnLoad(EventArgs e) +67
   System.Web.UI.Control.LoadRecursive() +35
   System.Web.UI.Page.ProcessRequestMain() +750

 
=================================================================================


ANYONE has any idea?
Avatar of BurntSky
BurntSky

Well, it sounds like your production server is missing adodb.dll.  It's odd though, because the error is actually being thrown by CrystalReports and you claim the production server has CR 10 installed (which should have included adodb.dll)

I'd try copying adodb.dll from C:\Program Files\Microsoft.Net\Primary Interop Assemblies\ on your dev machine to the /bin/ directory of your application on the production machine.
Avatar of rpatoriya

ASKER

It worked!!!! I really really appreciate your timely answer.  

How do you know that - that one particular file was missing?

AND - why do I have to put it manually that file under bin folder? Isn't that, VS.net should add to the reference automatically like all other dlls??
if this is a required dll for our solution, why did it compile without being referenced?


I have 5-more web application to move to the server - do I have to do this with each and every web application which uses crystal report?

Any suggestion?

Well, I knew the file was missing because that's what the error message said: "File or assembly name ADODB, or one of its dependencies, was not found."  I just know that the namespace ADODB is contained within adodb.dll.

The reason you have to put it in the /bin/ directory is because that is one of the first places the application looks when it can't find an assembly it needs.  You could also put it a number of different places.

The reason VS.NET didn't add the reference could be a number of reasons.  First, it could have not cared because on your development machine the assembly was in the GAC and it figured any other machine would have it there too.  The other reason could be because it wasn't directly referenced by your application; it was referenced by an assembly your application referenced (Crystal Reports).

Check out this knowledge base article; it might help you figure out how to make sure the other machines get the assembly:

http://support.microsoft.com/default.aspx?scid=kb;en-us;321688
ASKER CERTIFIED SOLUTION
Avatar of BurntSky
BurntSky

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial