关于asp.net Response流下载文件 遇到自带多线程下载器的浏览器出现的问题
源码如下:TempPath 是文件的路径
FileInfo DownloadFile = new FileInfo(TempPath);
TempPath = TempPath.Substring(TempPath.LastIndexOf("\\") + 1);
Response.Clear();
Response.ClearHeaders();
Response.ClearContent();
Response.Buffer = true;
Response.ContentType = "application/octet-stream";
Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode (TempPath, System.Text.Encoding.UTF8));
Response.AppendHeader("Content-Length", DownloadFile.Length.ToString());
Response.WriteFile(DownloadFile.FullName);
Response.Flush();
Response.Clear();
Response.Close();
现在一些主流的浏览器像360,搜狗等都自己带有多线程下载,这就造成每次执行我的下载业务逻辑时浏览器总是同时发出很多个线程,造成程序重复访问页面,这个问题怎么解决?