3
我被Ionic.Zip.dll
像这样(ASP.NET,C#)创建一个zip:失败 - 网络错误中获取Zip文件中铬
zip.AddEntry("Document.jpeg", File.ReadAllBytes("Path");
我想这样的下载:
Response.Clear();
Response.BufferOutput = false;
Response.ContentType = "application/zip";
Response.AddHeader("content-disposition", "filename=SuppliersDocuments.zip";
zip.Save(Response.OutputStream);
Response.Close();
我在Firefox和Chrome的本地主机上测试了这段代码,它工作正常。但是当我在主机上测试此代码时,出现此错误:
Failed - network error
是我的代码错了吗?
尝试添加content-Size到响应标题。让我知道它是否有效。 – Kahbazi