J
Jeff Dillon
From a client, I call
http://server/retrieve.aspx?guid=somevalue
Then, in page_load of retrieve.aspx I have
filespec = "test.mdb"
pathspec = "c:\"
MyFileStream = New FileStream(pathspec & filespec, FileMode.Open)
FileSize = MyFileStream.Length
Dim Buffer(CInt(FileSize)) As Byte
MyFileStream.Read(Buffer, 0, CInt(FileSize))
MyFileStream.Close()
Response.BufferOutput = True
Response.ContentType = "application/asp-unknown"
Response.AddHeader("content-disposition", "attachment; filename=" &
filespec)
Response.BinaryWrite(Buffer)
Response.Flush()
But if I have the above http link in an email message for example, the file
downloads just fine with the Save As dialog, but back in the browser, it
displays:
Action canceled
Internet Explorer was unable to link to the Web page you requested.
The page might be temporarily unavailable.
How can I place a meaningful message in the browser, or redirect?
Response.Redirect or Server.Transfer are ignored after the Flush. Any
ideas?
Jeff
http://server/retrieve.aspx?guid=somevalue
Then, in page_load of retrieve.aspx I have
filespec = "test.mdb"
pathspec = "c:\"
MyFileStream = New FileStream(pathspec & filespec, FileMode.Open)
FileSize = MyFileStream.Length
Dim Buffer(CInt(FileSize)) As Byte
MyFileStream.Read(Buffer, 0, CInt(FileSize))
MyFileStream.Close()
Response.BufferOutput = True
Response.ContentType = "application/asp-unknown"
Response.AddHeader("content-disposition", "attachment; filename=" &
filespec)
Response.BinaryWrite(Buffer)
Response.Flush()
But if I have the above http link in an email message for example, the file
downloads just fine with the Save As dialog, but back in the browser, it
displays:
Action canceled
Internet Explorer was unable to link to the Web page you requested.
The page might be temporarily unavailable.
How can I place a meaningful message in the browser, or redirect?
Response.Redirect or Server.Transfer are ignored after the Flush. Any
ideas?
Jeff