应该怎样配置
------解决方案--------------------------------------------------------
自己写代码来实现文件下载,而不是直接访问文件所在的URL
String value = "This is the test value"; //你也可以读取文件内容到value变量
Response.Clear();
Response.ClearHeaders();
Response.Buffer = false;
Response.ContentType = "application/octet-stream";
Response.ContentEncoding = System.Text.Encoding.UTF8;
Response.AddHeader("CONTENT-LENGTH", value.Length.ToString());
Response.AddHeader("Content-Disposition", "attachment; filename=download.txt");
Response.CacheControl = "public";
Response.Write(value);
Response.Flush();