IIS Error: CS0246: The type or namespace name iTextSharp could not be found

on Dec 23, 2020 12:22 AM

Use below code


its working on "http://localhost:24319/WebForm1.aspx"

but while i have lounch in ISS , its given error.

Server Error in '/Meja_Tel_Dir_PDF' Application.

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0246: The type or namespace name 'iTextSharp' could not be found (are you missing a using directive or an assembly reference?)

Source Error:

Line 9:  using System.Data.SqlClient;
Line 10: using System.IO;
Line 11: using iTextSharp.text;
Line 12: using iTextSharp.text.pdf;
Line 13: using iTextSharp.tool.xml;


Download FREE API for Word, Excel and PDF in ASP.Net: Download
on Dec 23, 2020 12:28 AM

iTextSharp dll is missing in your BIN folder on server.

So make sure it is present. Else copy the dll and paste in server.