5

I have an ASP.NET application Hosted on server 2008. Recently After latest chrome update to 53.0.2785.116m All of my downloads from server get fail. I tested chrome version 52, firefox and IE! all of them work. Any idea for this problem?

enter image description here

Fanjo Lama
  • 581
  • 3
  • 15
Hamid Fathi
  • 300
  • 1
  • 3
  • 13

1 Answers1

8

Finally I find the solution. web servers by default set the "content-length" in header and also most of the browser auto correct the file size if its wrong. in new version of google chrome (v53) the auto correct doesn't work. And at the end I had to set "content-length" property in HTTP Context while flushing the file to client.

Hamid Fathi
  • 300
  • 1
  • 3
  • 13
  • Thanks! This fixed it for me. – Nick Nov 30 '16 at 00:35
  • @HamidFathi Where did you set the `content-length` property. I have same error posted [here](https://stackoverflow.com/q/44337947/1232087). could you please help? – nam Jun 02 '17 at 23:00
  • 1
    Note, using either of `Response.Close();` or `Response.End();` will break downloading. Use `Response.Flush();` instead and then the `content-length` header is not required. https://stackoverflow.com/a/736462/481207 – Matt Nov 12 '17 at 21:34