Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Files download fails for ipad and iphone clients

Files download fails for ipad and iphone clients

Scheduled Pinned Locked Moved ASP.NET
iosquestionasp-netsysadminwindows-admin
6 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    alesanndro
    wrote on last edited by
    #1

    I have a web application based in aspnet 4.5 that is running on a Windows 2016 Server with IIS 10. The app allows to client the downloading of several documents (img, pdf, zip files). All works correctly from several years but starting from 4 weeks to now ios based client (ipad and iphone running 13.3 ios) receive corrupted files. Looking at the logs I have seen that the client closes the connection abnormaly. this is the code snippets i use to send files:

    Response.Clear();
    System.IO.FileInfo fInfo = new System.IO.FileInfo(allegatizipfilename);
    Response.AddHeader("Content-Length", fInfo.Length.ToString());
    Response.AddHeader("Content-disposition", "attachment; filename=allegati.zip");
    Response.ContentType = "application/octet-stream";
    Response.TransmitFile(allegatizipfilename);
    Response.Flush();
    Response.End();

    I have tried to disable http2, to allow longer connection time, to reduce the minimal connection speed all with no results. What is strange to me is the fact that anything worked fine till some week ago and nothing was changed in the server configuration nor the software code. Anyone has the same issue ?

    N 1 Reply Last reply
    0
    • A alesanndro

      I have a web application based in aspnet 4.5 that is running on a Windows 2016 Server with IIS 10. The app allows to client the downloading of several documents (img, pdf, zip files). All works correctly from several years but starting from 4 weeks to now ios based client (ipad and iphone running 13.3 ios) receive corrupted files. Looking at the logs I have seen that the client closes the connection abnormaly. this is the code snippets i use to send files:

      Response.Clear();
      System.IO.FileInfo fInfo = new System.IO.FileInfo(allegatizipfilename);
      Response.AddHeader("Content-Length", fInfo.Length.ToString());
      Response.AddHeader("Content-disposition", "attachment; filename=allegati.zip");
      Response.ContentType = "application/octet-stream";
      Response.TransmitFile(allegatizipfilename);
      Response.Flush();
      Response.End();

      I have tried to disable http2, to allow longer connection time, to reduce the minimal connection speed all with no results. What is strange to me is the fact that anything worked fine till some week ago and nothing was changed in the server configuration nor the software code. Anyone has the same issue ?

      N Offline
      N Offline
      Nathan Minier
      wrote on last edited by
      #2

      If it's presented as a standard download it might well be a header or CORS issue. If it's an async download, the error likely lies in the javascript running in the browser. Determine the download method, check the crapple browser API, and play "spot the difference".

      "Never attribute to malice that which can be explained by stupidity." - Hanlon's Razor

      A 1 Reply Last reply
      0
      • N Nathan Minier

        If it's presented as a standard download it might well be a header or CORS issue. If it's an async download, the error likely lies in the javascript running in the browser. Determine the download method, check the crapple browser API, and play "spot the difference".

        "Never attribute to malice that which can be explained by stupidity." - Hanlon's Razor

        A Offline
        A Offline
        alesanndro
        wrote on last edited by
        #3

        Thanks for your reply, I will investigate over the things you suggest But the very strange thing is that the same server configuration worked up to 4 weeks ago and everything is working well in Android or windows Also we tried several browser as an alternative to Safari, all getting the same results... Is there in your opinion a chance of a bug in ios?

        N 1 Reply Last reply
        0
        • A alesanndro

          Thanks for your reply, I will investigate over the things you suggest But the very strange thing is that the same server configuration worked up to 4 weeks ago and everything is working well in Android or windows Also we tried several browser as an alternative to Safari, all getting the same results... Is there in your opinion a chance of a bug in ios?

          N Offline
          N Offline
          Nathan Minier
          wrote on last edited by
          #4

          A lot of configurations, such as what encryption standards are acceptable, can be configured at the OS level; it's possible that they locked it down further. The odds of that serious a bug in something as well traversed as the network stack are unlikely. Can you get wireshark on a client and see what's happening? That would allow you to troubleshoot the TLS handshake, and the overall traffic flow in general.

          "Never attribute to malice that which can be explained by stupidity." - Hanlon's Razor

          A 1 Reply Last reply
          0
          • N Nathan Minier

            A lot of configurations, such as what encryption standards are acceptable, can be configured at the OS level; it's possible that they locked it down further. The odds of that serious a bug in something as well traversed as the network stack are unlikely. Can you get wireshark on a client and see what's happening? That would allow you to troubleshoot the TLS handshake, and the overall traffic flow in general.

            "Never attribute to malice that which can be explained by stupidity." - Hanlon's Razor

            A Offline
            A Offline
            alesanndro
            wrote on last edited by
            #5

            It was simpler: ios Doesn't accepts octet-streams mime type...

            N 1 Reply Last reply
            0
            • A alesanndro

              It was simpler: ios Doesn't accepts octet-streams mime type...

              N Offline
              N Offline
              Nathan Minier
              wrote on last edited by
              #6

              Ah, ignoring the standard. There's a shock.

              "Never attribute to malice that which can be explained by stupidity." - Hanlon's Razor

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups