Browser is shut down after download!?

G

Guest

Hi,

I have created a website, where users can download some documents. After
clicks on a specific download-link following code is used:

Dim file As System.IO.FileInfo = New System.IO.FileInfo(filename)
If file.Exists Then
Response.Clear()
Response.AddHeader("Content-Disposition", "attachment;
filename=" & file.Name)
Response.AddHeader("Content-Length", file.Length.ToString())
Response.ContentType = "application/msword"
Response.WriteFile(file.FullName)
Response.End()
Else
Response.Write("Document doesn't exist.")
End If

So, that works fine on most machines. But on some the browser is shut down
after downloading the document. I've read somthing about that this was a
known problem in IE 5.5, but all users of mine are using IE 6.

So, does somebody know, what I'm doing wrong!?

Thanks,

Fabian F.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top