Re: Content-Disposition starts a new session



Anyone?? (apologies for double post - msimn screwed up..)

I've since tried the following -

1) Moving the code to do the export to a new web application and using a
webserver caching method to retrieve the report data
2) Saving the document on the server and providing a simple link to the
generated file

Method 1 gets around the 'file not found' issue but the new session problem
remains.
Method 2 seems to allow opening the file to work ok, but saving the file
this time causes the new session bug.

This issue is a obviously a showstopper for our clients!

Simon


hi,

I'm having a serious issue with the VS 2003 / 1.1 framework and
attachments. If I try to prompt to open/save a file with the following

public void WriteBinaryResponse(HttpResponse aResponse, string
aContentType, byte[] aData, string aDefaultFileName)
{
aResponse.ClearContent();
if (aDefaultFileName != null)

aResponse.AppendHeader("Content-Disposition","attachment;filename=\""+aDefaultFileName+"\"");
aResponse.AppendHeader("Content-Length", aData.Length.ToString());
aResponse.ContentType = aContentType;
aResponse.BinaryWrite(aData);
aResponse.Flush();
aResponse.Close();
}

then on next PostBack, a new Session is created! Can't find any solutions
on google etc. :( Also (randomly) selecting 'open' comes up with 'file not
found'. I read that this can sometimes happen due to caching, but I'm not
setting any cachability on the page...

TIA

Simon



.



Relevant Pages

  • Re: Saving DataTable to session vs saving a Custom object.
    ... I don't think the session you refer to will actually result in any ... The biggest overhead you'd see in memory usage would be the ... > DataTable to session vs saving a custom object of the same data. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Default setting for Saving attachments
    ... You can change the setting for that session by saving a whole message to ... "Lynn W" wrote in message ... > save any pics there which is what I am usually saving, ... > could change it rather than having to scroll to find the usual folder to ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Saving a class instance in a session variable
    ... I am not saving any file handles. ... with the command "getState" and tries to fetch the class instance from ... class stored as a session variable? ...  Either of these can cause problems loading objects from the ...
    (alt.php)
  • Re: Issue with threading?
    ... then remove from the Session once it has been used. ... Instead of saving the info to a cookie, ... impossible given that they are three separate apps? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Vista Shutdown
    ... And why do you think it is not saving the settings. ... Because he changed them during a session. ... Duh ...
    (microsoft.public.windows.vista.general)