Security error on download



I just switched to version from 3.7 and I get a 'Security WArning' on download and the Excel file does not open,

I am using the following code to open the file in the browser.

excel.Save("test.xls", SaveType.OpenInExcel, FileFormatType.Default, this.Response);

Please let me know how to resolve this. I tried putting the Aspose.cells binary in the GAC but that did not solve the issue.




Hi Aarti,

We don't make any change on security from 3.7 to 3.7.2. Maybe it's a deployment issue.

Have you remove reference to old aspose.cells.dll and re-add reference to the new dll in the project? After doing it, please rebuild your program. Aspose.Cells is a strong named dll so you have to rebuild your application.


Thanks Laurence. I did compile the code with the new dll, but I still get the same error that IE tries to download file.aspx?format=EXCEL and if I click OK it says 'Could not open page https//url/file.aspx?format=excel'

When i replace the orignal dll compiled with 3.7 it works. ALso I checked my IE settings and they are teh same as before. Please let me know if there is anything else I can try out.



Hi Aarti,

In v3.7.2, to solve an issue with http compression, we change some http header in Reponse object. This may cause your problem. You can try this piece of code:

MemoryStream stream = new MemoryStream();

excel.Save(stream, FileFormatType.Default);

byte[] data = stream.ToArray();

this.Response.ContentType = "application/xls";
Response.AddHeader( "content-disposition","attachment; filename=test.xls");


Thanks so much Laurence! That solved my issue…