private void TestPdf()
{
string path = Server.MapPath("~\\C:\\rnd\\test.PDF");
WebClient client = new WebClient();
Byte[] buffer = client.DownloadData(path);
if (buffer != null)
{
Response.ContentType = "application/pdf";
Response.AddHeader("content-length", buffer.Length.ToString());
Response.BinaryWrite(buffer);
}
}
Its work for me.
When u mapping file make sure I n url / path its returning with .pdf ext.