Aspose.Cells Save Issue


I have a situation where workbook.Save is failing when running at the server root. The following code creates a zero byte file and produces a "Object not set to an instance of an object" error but when it resides in a subfolder it operates flawlessly.

Dim oFile As String
oFile = "~/Export/" & Context.Session.SessionID.ToString() & ".xml"
workbook.Save(Context.Server.MapPath(oFile), FileFormatType.AsposePdf) <--- fails <-- perfect operation

It also produces incomplete worksheet saves when it saves to the Response object

workbook.Save("SomeReport.xls", FileFormatType.Excel2000, Aspose.Cells.SaveType.OpenInExcel, Response) <--- fails <-- perfect operation


This may be caused by your IIS settings. Aspose.Cells doesn't have any difference with creating files in these situations.