Excel.Save method gives "Internet Explorer cannot display the webpage" error

I am rewriting an ASP NET 1.0 application for Net 2.0. It has worked beautifully for us on NET 1.0. It's ages since I originally wrote the app and I don't know which version of Aspose I'm using (the dll just says Aspose.Cells.dll. I'm also on Vista with IIS 7. I can't upgrade because my license expired Dec 06 and we don't need any new functionality.

When I use the save method to open the spreadsheet in a browser and prompt for the user to save or open, it gives me a "Internet Explorer cannot display the webpage" error in the browser. The code goes past the call to save, but the page just sits there, then flips to the error page.

My app produces a very large spreadsheet with multiple worksheets, but it doesn't work on even an extremely simple spreadsheet either.

My code is as follows: (You'll see it's a trivial example, but it still doesn't work.) The identical code works in NET 1.0 on IIS 6.

Dim wkbook As New Excel

Dim sheet As Worksheet = wkbook.Worksheets(0)

Dim cells As Cells = sheet.Cells

cells("A1").PutValue(10)

cells("A2").PutValue(20)

cells("A3").Formula = "=sum(A1:A2)" (at this point in my real app I have verified that it is a valid workbook object with worksheets, etc)

wkbook.Save("Plan.xls", SaveType.OpenInExcel, FileFormatType.Default, Me.Response)

Any ideas would be greatly appreciated. Jackie

Hi Jackie,

Thanks for considering Aspose.

Since you are using older version of Aspose.Cells. I think there might be some problem with the older version working on .Net2.0, so you have to upgrade to newer version of Aspose.Cells. I tested your code and it works fine on .Net2.0:

Workbook wkbook = new Workbook();
Worksheet sheet = wkbook.Worksheets[0];
Cells cells = sheet.Cells;
cells["A1"].PutValue(10);
cells["A2"].PutValue(20);
cells["A3"].Formula = "=sum(A1:A2)"; //(at this point in my real app I have verified that it is a valid workbook object with worksheets, etc)
wkbook.Save("Plan.xls", SaveType.OpenInExcel, FileFormatType.Default, this.Response);

Please try the latest version 4.4.0.0

Thank you.

Thanks for the reply. I can’t find out what it costs to upgrade from one version to another. Can you please tell me. What is the earliest version that definitely works with .Net 2.0?

Thanks Amjad, I have been able to get it working well with version 4.1.0.0, which I am still licensed for. Thanks for your help anyway.