附件下载功能,在本机测试好用,发布到服务器IIS后失效。
相关代码:string path = S0201_Logic.GetAttachmentByIncident(type, IncidentId);
                if (!string.IsNullOrEmpty(path))
                {
                    string filePath = Server.MapPath(path);//路径
                    FileInfo DownloadFile= new FileInfo(filePath);
                    if (DownloadFile.Exists)
                    {
                                                Response.Clear();
                        Response.ClearHeaders();
                        Response.Buffer = false;
                        Response.ContentType = "application/octet-stream";
                        Response.AppendHeader("Content-Disposition", "attachment;filename=" + ToHexString(DownloadFile.Name));
                        Response.AppendHeader("Content-Length", DownloadFile.Length.ToString());
                        Response.WriteFile(DownloadFile.FullName);
                        Response.Flush();
                        Response.End();
                    }                }数据库中附件地址格式如下:/upload/2012/8/25/啊啊.xlsx
请问各位可能会是什么原因导致下载失效的呢