用以下代码:
string strDocDir;
string strFile;
strDocDir="updownload";
strFile=Request.QueryString["strFile"];
string filename=Server.MapPath(strDocDir)+"\\"+strFile;

if(File.Exists(filename))
{ Response.ContentType = "application/ms-download";
System.IO.FileInfo file = new System.IO.FileInfo(filename);
Response.Clear();
Response.Charset = "utf-8";
Response.AddHeader("Content-Disposition", "attachment;filename="+System.Web.HttpUtility.UrlEncode(file.Name,System.Text.Encoding.UTF8));
Response.AddHeader("Content-Length", file.Length.ToString());
Response.WriteFile(file.FullName);
Response.Flush(); 
Response.Clear();
Response.End();
}
else
{
Response.Write("<script>alert('此附件不存在');</script>");
}50M以下的没问题,但是试了160M的,却发现无法解析下载文件,打开了乱码的页面,求解决方法!!!