مشكلة HTTPS SSL
Contents
[
Hide
]
مشكلة HTTPS/SSL
أبلغ بعض المستخدمين أنهم واجهوا مشاكل في تنزيل ملفات Excel التي تم إنشاؤها باستخدام Aspose.Cells. عندما يفتح مربع الحفظ، يحتوي اسم الملف على اسم صفحة aspx بدلاً من ملف Excel، ونوع الملف فارغ.
تفسير
قمنا بتغيير رؤوس الاستجابة HTTP لحل مشكلة ضغط HTTP. قد يسبب هذا مشكلة أثناء إرسال الملفات إلى متصفح العميل عبر HTTPS/SSL.
الحل
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()); |