Hi - I need some help.
I have upgrated my server, webserver, ... to windows 2008, IIS 7.0 and ASP.NET 3.5. That gives me some problems.
I have a page where people can upload and download documents. Upload works fine but download doesn't work.
The documents is downloaded by using a hyperlink with link download.aspx?file=test.txt where test.txt is the document, that is placed in a folder on the web-server.
The importent code in download.aspx is:
Dim filename As String = Path.GetFileName(filepath)
Dim filepath As String = Server.MapPath(Request("file"))
Dim file As System.IO.FileInfo = New System.IO.FileInfo(filepath)
Response.Clear()
Response.ContentType = "application/octet-stream"
Response.AddHeader("Content-Length", file.Length.ToString())
Response.AddHeader("Content-Disposition", "attachment; filename=""" & file.Name & """")
Response.Flush()
Response.WriteFile(filepath)
Response.End()
I worked fine before upgrading, but the "Save/Open"-window opens correctly, but when I click the Save- or Open-button it lookes like download is started but nothing happens. The statusbar doesn't change.
Hope someone can help me.
Thanks