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

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top