asp.net文件下载,如果本机下载可以,其他客户端访问下载不成功!
FileInfo DownloadFile = new FileInfo(@ "D:\AnjiSln\AnjiSln\AnjiSlnNorth\Anji Sln "+Session[ "FilePath "].ToString().Replace( "~ ", " ").Trim());
Response.Clear();
Response.ClearHeaders();
Response.Buffer = false;
Response.ContentType = "application/octet-stream ";
Response.AppendHeader( "Content-Disposition ", "attachment;filename= " + HttpUtility.UrlEncode(DownloadFile.FullName, System.Text.Encoding.UTF8));
Response.AppendHeader( "Content-Length ", DownloadFile.Length.ToString());
Response.WriteFile(DownloadFile.FullName);
Response.Flush();
Response.End();
找点网上的代码应该没有问题,是IIS设置有问题?
------解决方案--------------------what do u want to do
------解决方案--------------------你下载自己电脑上的东西是可以,别人肯定不行啥
------解决方案--------------------提示什么错误啊?session没有保存住吧?
------解决方案--------------------其他客户端访问下载不成功!
——————————————————————————————————————
看不懂
------解决方案--------------------路径不对吧,