HTTPS SSL-problem
Contents
[
Hide
]
HTTPS/SSL-problem
Vissa användare rapporterade att de hade problem med att ladda ner Excel-filer genererade med Aspose.Cells. När dialogrutan Spara öppnas innehåller filnamnet namnet på aspx-sidan istället för excel-filen, och filtypen är tom.
Förklaring
Vi ändrade HTTP-svarsrubriker för att lösa problemet med HTTP-komprimering. Detta kan orsaka problem när du skickar filer till klientens webbläsare via HTTPS/SSL.
Lösning
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
// Saves file to memory | |
MemoryStream stream = new MemoryStream(); | |
excel.Save(stream, SaveFormat.Excel97To2003); | |
Response.ContentType = "application/vnd.ms-excel"; | |
// This is same as OpenInExcel option | |
Response.AddHeader("content-disposition", "attachment; filename=book1.xls"); | |
// This is same as OpenInBrowser option | |
// response.AddHeader("content-disposition", "inline; filename=book1.xls"); | |
Response.BinaryWrite(stream.ToArray()); |