I'm trying to return a zipped file
public FileResult Download()
{
MemoryStream outputStream = new MemoryStream();
using (ZipFile zip = new ZipFile())
{
zip.AddEntry("asdasd.html", "<html>fgdfg</html>");
zip.AddEntry("asdassssd.html", "<html>asddsaf</html>");
zip.Save(outputStream);
}
return File(outputStream, "application/zip", "file.zip");
}
but in response it returns an error (in XML):
XML Parsing Error: no element found Location: moz-nullprincipal:{122aa411-1418-43f5-b950-4347af7c7217} Line Number 1, Column 1:
What is wrong with my response (to zip files i use DotNetZip)?
– 1gn1ter Aug 24 '11 at 11:24