Click here to Skip to main content
15,891,704 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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
Updated 20-Aug-12 19:46pm
v3
Comments
AmitGajjar 21-Aug-12 2:01am    
Where you are copying your DLL ?
[no name] 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.
[no name] 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.

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........
 
Share this answer
 
Comments
Kuthuparakkal 21-Aug-12 1:46am    
nice
[no name] 21-Aug-12 2:33am    
i'm followig those steps but no use,i'm getting same error
uspatel 21-Aug-12 2:40am    
Check your web.config,if it have entry for iTextSharp Dll,remove it and then follow above steps......
[no name] 21-Aug-12 3:04am    
in my web.config,there is no data related that
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
 
Share this answer
 
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
 
Share this answer
 

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


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900