Last post Jan 01, 2008 04:45 PM by gchq
Dec 06, 2005 08:38 AM|Michael Sawczyn|LINK
My apologies if this is the wrong forum for this, but nothing else looked close.
I'm stuck with what I thought was a simple task. I'm just about to write an HttpHandler to do the work, but figured there must be something I'm missing.
I'm generating an Excel spreadsheet in memory (xml format) and sending it to the user in response to the click of a linkbutton. This works swimmingly with the following code in the Click handler:
string result = GenerateFile();
Response.ContentType = "application/vnd.ms-excel";
Response.RedirectLocation = "OSASData.xls";
That is, it works swimmingly until I move the site to SSL. Under an https URL, when I click the linkbutton on the hosting page (import.aspx), the result is an attempt to download the file import_aspx on IE 6.0.2900, and import.aspx on IE 6.0.3790.
Can anyone help? Is a RedirectLocation simply not allowed under SSL? The only alternative I can think of is to write a handler for *.xls and return the file that way, but I'm figuring that's overkill.
Thanks in advance for any tips.
Dec 06, 2005 12:11 PM|Michael Sawczyn|LINK
An update on this:
It's the oddest thing. If I copy and paste the above code into the Click event of a linkbutton on its own page, everything works perfectly. Now I'm really confused.
Jan 01, 2008 04:45 PM|gchq|LINK
I'm having the same issue - neither response.redirect nor Response.Redirect Location will work - either as a button event OR a LinkButton event! As this is transferring credit card information is has to be SSL and really needs to be wrapped in an update
Anyone got any ideas on this issue, or how to overcome it?