Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#4.0
Hi
EvaryBody...
 

I'm adding a reference iTextSharp.dll to my Project.But when i execute the page at the time it shows the error like this
 
Could not load file or assembly 'itextsharp, Version=3.1.7.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca' or one of its dependencies. The system cannot find the file specified. 
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: Could not load file or assembly 'itextsharp, Version=3.1.7.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca' or one of its dependencies. The system cannot find the file specified.
 
Source Error: 
 
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  
 
Assembly Load Trace: The following information can be helpful to determine why the assembly 'itextsharp, Version=3.1.7.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca' could not be loaded.
 

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
 
 
 
Stack Trace: 
 

[FileNotFoundException: Could not load file or assembly 'itextsharp, Version=3.1.7.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca' or one of its dependencies. The system cannot find the file specified.]
   lnt.EIPVidhya.EDMS.Layouts.EDMS.MessageView.btnExportToPDF_Onclick(Object sender, EventArgs e) +0
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +115
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +140
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2981
 
 
 

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.5456; ASP.NET Version:2.0.50727.5456 
 
can anyone help me to solve this
 

Thanks...
Posted 20-Aug-12 19:41pm
Edited 20-Aug-12 19:46pm
v3
Comments
@amitgajjar at 21-Aug-12 2:01am
   
Where you are copying your DLL ?
@amitgajjar at 21-Aug-12 2:34am
   
are you sure your project reference is from this location ? delete and add reference again.
@amitgajjar at 21-Aug-12 2:40am
   
Error says "file not found" so try to place this file somewhere else in new folder and add new location reference.
@amitgajjar at 21-Aug-12 2:52am
   
is this runtime error ?
MohitGenious at yesterday
   
I am adding dll at two places one at system 32 assembly another at project assembly.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

try these steps
 
1. Copy DLL to some other location as on Desktop
 
2. Delete reference from project and also delete the DLL from BIN
 
3. Copy the DLL to project root
 
4. Add reference and choose the DLL from root.
 
5. Build and try running
 

hope it will help........
  Permalink  
Comments
Kuthuparakkal at 21-Aug-12 1:46am
   
nice
Uma Shankar Patel at 21-Aug-12 2:40am
   
Check your web.config,if it have entry for iTextSharp Dll,remove it and then follow above steps......
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

hii,
 
copy dll to bin folder and then add reference .
before this remove reference from web.config.
 
also check any dependency required for that dll
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web02 | 2.8.140709.1 | Last Updated 21 Aug 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid