Response.TransmitFile falla en Safari bajo SSL

We have a download page where users can download a PDF document. This page is currently served as HTTPS. Under Safari , solamente (both Windows and Mac) the download will fail 99% of the time after being around 3/4 downloaded (once in a blue moon it will work). The problem immediately goes away if we replace the "https" part of the URL with "http".

The code is as follows, I believe standard .NET file output:

string pdfFile = // generate file here and get the path...
var info = new FileInfo(pdfFile);
Response.ClearContent();
Response.ClearHeaders();
Response.ContentType = "application/pdf";
Response.AppendHeader("Content-Disposition", string.Format("attachment;Filename={0}", info.Name);
Response.TransmitFile(pdfFile);
Response.Flush();
Response.Close();

Este problema es , solamente in Safari; IE, Firefox and Chrome download the file correctly every time. Safari fails 9/10 times.

Any ideas? We have around 4,000 visitors to the site a month in Safari so this isn't something we can ignore.

preguntado el 09 de marzo de 12 a las 14:03

1 Respuestas

You could always try response.writefile instead (think this loads into memory on server first as appose to transmitfile) just to see if it helps.

respondido 09 mar '12, 15:03

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.