悬赏园豆:10
[已关闭问题]
关闭于 2008-08-20 13:30
<P>一个Demo.aspx页面放一个下载按钮,里面的代码是<BR> string saveFileName = "Temp/WinFormDemo.exe";<BR> Response.Clear();<BR> Response.Charset = "UTF-8";<BR> Response.Buffer = true;<BR> this.EnableViewState = false;<BR> Response.ContentType = "application/octet-stream";<BR> Response.ContentEncoding = System.Text.Encoding.UTF8;<BR> Response.AppendHeader("Content-Disposition", "attachment; filename=" + saveFileName);<BR> Response.WriteFile(saveFileName);<BR> Response.Flush();<BR> Response.Close();<BR> Response.End();<BR>在本地执行,该exe文件可以下载,可是放在服务器上边,点击下载按钮弹出下载Demo.aspx页面的提示框,而不能下载该exe文件,是不是服务器IIS中设置的问题?我已经在服务器IIS中的MIME Map中新增文件类型.exe, 可是还是不行,不知道怎么处理,请教!</P>