Response.Redirect Causes Problems Opening File

Hi


I have come accross a strange issue and am not sure what is causing it. When I open my page via a hyperlink, I can use aspose to open an Excel workbook with no problems, but when I open my page using Response.Redirect(), I get the message attached.

When I click no, the file opens normally, but when I click yes it opens with a .aspx extension.

I am using this overload of the save method to open the file;

myWorkbook.Save(holdFile.Name, FileFormat, SaveType.OpenInBrowser, PageResponse);

Is this something you have seen before? Is there a simple fix to do with buffereing or caching?

Thanks

Jared

Sorry, having done more experimentation, this problem is even stranger than I first thought.


It is not to do with Response.Redirect, it is dependent on the length of the query string.

E.g.

This works fine;

CascadeReportsEdit.aspx?TestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTest=Test&Record=1

This does not work properly;

CascadeReportsEdit.aspx?Record=1

Any ideas?

Thanks

Jared

Hi Jared,

Thank you for considering Aspose.

Well, it’s a very strange issue. As you have mentioned that this occurs when passing different values in the query string, so it has nothing to do with Aspose.Cells APIs. I think, you may try some Microsoft forums regarding ASP.NET issues to check out if any solution is present regarding this query string issue.

Thank You & Best Regards,

Just for info, it seems like this problem is specific to Office 2007. For some reason only a short URL causes the following request to be sent from Excel;

2009-03-03 14:15:19 192.168.0.61

  • W3SVC1 JHOLGAT-PC 192.168.0.61 80

HEAD /cascade/dotnet/reporting/CascadeReportsEdit.aspx

Record=14

200 0 222 300 500

HTTP/1.1 jholgat-pc Microsoft+Office+Existence+Discovery

CascadeRecruitment1=CompanyID=1&UserID=1;+ASP.NET_SessionId=lrikan55wod5tcqixnmtz345

This request causes or is related to the cause of the dialogue I mentioned above. Here is a link with some explanation, but I am really struggling to find anything else on the subject.

http://blogs.msdn.com/vsofficedeveloper/pages/Office-Existence-Discovery-Protocol.aspx

Basically, the only way I can find to avoid this issue in Office 2007 is to append a load of rubbish onto the end of my URLs.

If you should happen to come across any information on this subject or a fix, I’d much appreciate you letting me know.

Thanks

Jared

Hi Jared,

Please check the document for your reference: http://support.microsoft.com/kb/948615

Thank you.