Hi,
I have been struggling to get file downloads working for some time now. Files that are a few Mb or less don't seem to cause a problem but larger files stop after a minute or so.
I have tried two methods so far and neither seems to work any better than the other.
First Method:
Sub DownloadFile(ByVal FilePath As String, ByVal FileName As String)
Dim path As String
If FilePath <> "" Then 'get absolute path of the file
path = Server.MapPath(FilePath)
'get file object as FileInfo
Dim file As System.IO.FileInfo = New System.IO.FileInfo(path)
'-- if the file exists on the server
If file.Exists Then 'set appropriate headers
Response.Clear()
Response.Buffer = True
Response.AddHeader("Content-Disposition", ...
Go to the complete details ...