Free Support Forum - aspose.com

XP SP2 - Can't open an Excel file in child window

Hi,

We are using Aspose.excel in our internet web application to export data in pre-selected Excel templates which after being populated are loaded in a IE child window.

This application has been running on production for several months without any problems with the following config:
- server (IIS, COM+) - Win XP SP1 – ASPOSE.EXCEL v2.0.0.0
- client - Win XP SP1 - Office 2000 or 2003.

However, this functionality does not work when the client is running Win XP SP2 (release scheduled this week by MS).<?xml:namespace prefix = o ns = "urnTongue Tiedchemas-microsoft-comSurprisefficeSurpriseffice" /><oStick out tongue></oStick out tongue>

The unexpected behavior is the following: The child window opens and closes immediately with a beep sound.

<oStick out tongue></oStick out tongue>

More precisely, if you connect to your local machine (same domain), then the child windows opens and the content is loaded properly.<oStick out tongue></oStick out tongue>

However if you access a web site which is not running under the same domain than your local machine forcing the IE popup blocker to act, then the child window will open and close immediately.<oStick out tongue></oStick out tongue>

<oStick out tongue> </oStick out tongue>

This issue has been reproduced consistently with several clients using XP SP2.<oStick out tongue></oStick out tongue>


This bug is critical and I hope you can support us in finding a fix or a work around.<oStick out tongue></oStick out tongue>

<oStick out tongue> </oStick out tongue>

Thank you.<oStick out tongue></oStick out tongue>

<oStick out tongue> </oStick out tongue>

Olivier<oStick out tongue></oStick out tongue>

<oStick out tongue> </oStick out tongue>

<oStick out tongue> </oStick out tongue>

Here is the code:

-------------------------------------------------------------------------------
ASP code
-------------------------------------------------------------------------------
' New COM+ Service
Set ExcelReport = Server.CreateObject("Serviced.Reports")

' adjust license file
ExcelReport.LicenseFile = Server.MapPath("/Member/Licenses/Aspose.Excel.lic")

' prepare template name
template = Server.MapPath("/Member/Templates/Text.xls")

' use binary write method to populate the content of the page <oStick out tongue></oStick out tongue>

Response.BinaryWrite ExcelReport.AsExcel(template)


-------------------------------------------------------------------------------
.NET Code
-------------------------------------------------------------------------------<oStick out tongue></oStick out tongue>

[return: MarshalAs(UnmanagedType.SafeArray)]<oStick out tongue></oStick out tongue>

public byte[] AsExcel(string template)
{<oStick out tongue></oStick out tongue>

Excel excel;
// Do some work
....
....
// get a temporary memory stream to keep content of the report
MemoryStream stream = null; <oStick out tongue></oStick out tongue>

// save document to temporary
stream=excel.Save("Report.xls", FileFormatType.Default, out stream);<oStick out tongue></oStick out tongue>

// get the content in byte array
byte[] result = new byte[stream.Length];<oStick out tongue></oStick out tongue>

// prepare array
stream.Read(result, 0, (int)stream.Length);

// get result
return result;
}
<oStick out tongue></oStick out tongue>

Dear Oliver,

I haven’t a WinXP SP2 on hand so I cannot test it now. For this issue, I think it’s not a problem of Aspose.Excel but caused by the security setting of WinXP SP2. Please check the security setting in IE and xls extension setting in windows explorer.