Click here to Skip to main content
15,884,388 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In our application, while downloading PDF file getting "Failed - Network Error". The same functionality is working fine in IE and FF.

Chrome version: 62.0.3202.75

Operating system: Windows 10, 64 bit

Screen shot attached[^]

In the attached picture you can see in the bottom left side under the attachment "Failed - network Error" is showing.

What I have tried:

Googled about it but didn't find much help. Someone was talking about increasing content header length, even that is tried but nothing happened even application stopped working.
Posted
Updated 25-Apr-21 7:58am
v2
Comments
Richard MacCutchan 2-Nov-17 9:14am    
Picture is just a blue blob. Also, is this your application or Chrome; your question is not clear?
Karthik_Mahalingam 2-Nov-17 9:33am    
error message at the bottom left corner of the image.
sunil kumar meena 3-Nov-17 5:59am    
Issue is not with application because same functionality is working with IE and FF, also in old versions of Chrome but not the recent versions of Chrome. In my attached picture you can see the downloaded file in the bottom left, it's showing "Failed - Network Error".
Richard MacCutchan 3-Nov-17 6:26am    
OK, so there was a network error. But there is nothing in that message that can help anyone here to diagnose the problem.
sunil kumar meena 6-Nov-17 7:21am    
As you can see in attached snap, there is no more information available, otherwise I would have mentioned it here or tried to google it.

Found solution, in latest versions of Chrome after adding "Transfer-Encoding" header it starts working.

Response.AddHeader("Transfer-Encoding", "identity");
 
Share this answer
 
Change PDF MIME Type in Web Server from "
application/pdf
" to "
application/octet-stream
".
This problem is when is enabled gzip compression and/or HTTP/2
 
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