I have some code to stream files (for security of the files), the code works for all files in IE, and small files in firefox. but If the file is large (eg 750Mb) firefox hangs before it shows the open/save dialog box.
However if i take out response.clearheaders and the response.flush in the code it does download but all the files downloaded by firefox are corrupt because the file size is too large. Filenames are guids but I took the "-" out incase that was an issue.
If any one can shed some light on this I would be very grateful.
Function is Below.
Private Sub StreamFile(ByRef response As HttpResponse, ByVal sFile As String)
Dim fs As FileStream = Nothing
Dim sFileName As String = Path.GetFileName(sFile)
Dim oFile As New FileInfo(sFile)
fs = New FileStream(sFile, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)
Catch ex As Exception
'response.ClearHeaders() 'makes file size wrong in firefox
'To forcefully download, even for Excel, PDF files, reg
View Complete Post