Click here to Skip to main content
13,046,184 members (56,948 online)
Rate this:
 
Please Sign up or sign in to vote.
See more:
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
Updated 20-Aug-12 19:46pm
v3
Comments
@amitgajjar 21-Aug-12 2:01am
   
Where you are copying your DLL ?
pranathis012 21-Aug-12 2:31am
   
E :\ my folder\iTextSharp.dll
@amitgajjar 21-Aug-12 2:34am
   
are you sure your project reference is from this location ? delete and add reference again.
pranathis012 21-Aug-12 2:38am
   
yes ,i do that but no use
@amitgajjar 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.
pranathis012 21-Aug-12 2:45am
   
Now I put that file in D:\ drive ,but it shows same error
@amitgajjar 21-Aug-12 2:52am
   
is this runtime error ?
pranathis012 21-Aug-12 3:02am
   
s
MohitGenious 11-Jul-14 3:06am
   
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 21-Aug-12 1:46am
   
nice
pranathis012 21-Aug-12 2:33am
   
i'm followig those steps but no use,i'm getting same error
Uma Shankar Patel 21-Aug-12 2:40am
   
Check your web.config,if it have entry for iTextSharp Dll,remove it and then follow above steps......
pranathis012 21-Aug-12 3:04am
   
in my web.config,there is no data related that
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  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

hi,
1. download itextsharp.dll Version=3.1.7.0
and put in assembly
2. iis rest

and check again
for me it's work fine
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 3 Feb 2015
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100