Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi..

I have created a ASP.NET site that at the end generates the PDF forms and displays it to the user.
this is working fine in IE8 version but its not working in IE10 gives error .PDF couldnt be downloaded, gives same error even though I change browser mode to IE8 using f12.

I am using following snippet to display PDF and the PDf is created using itextsharp:

C#
Response.ContentType = "application/pdf";
Response.Charset = null;
Response.AppendHeader("Content-Disposition", "attachment; Filename= " + FileName);
Response.TransmitFile(FilePath);
Response.Flush();
Response.Close();

Filepath is the path of the PDF file.

Hope someone will give correct resolution for the problem.

Thanks,
Janie
Posted
Comments
Bajirao_ 19-Jun-13 2:54am    
As you said it worked in IE8, it seems issue related with setting.
Check this might help...

http://answers.microsoft.com/en-us/ie/forum/ie10-windows_8/unable-to-open-pdf-files-in-internet-explorer-10/ef3be169-6beb-472f-b9b0-4bd004e65b4d
Mahesh Bailwal 19-Jun-13 4:03am    
Mahesh Bailwal - 1 sec ago
What error are you getting.?

1 solution

Try Following:

1)Go to Internet Options

2)Advanced->Settings

3) Under security tab,uncheck the option 'Do not save encrypted pages to disk'

Regards.. :)
 
Share this answer
 
v2

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



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