Support forums

Session is cleared after upload

Last post 09-10-2009, 11:18 AM by RedBully. 1 replies.
Sort Posts: Previous Next
  •  09-10-2009, 4:14 AM 55515

    Session is cleared after upload

    I'm using a basic Uploader within an asp:updatepanel
    <asp:UpdatePanel ID="TicketPanel" runat="server" UpdateMode="Conditional">
        <CuteWebUI:Uploader runat="server"
                            InsertText="Add Attachment..."
                            OnFileUploaded="Attachment_UploadComplete" >

              <ValidateOption MaxSizeKB="1024" AllowedFileExtensions="jpeg,jpg,gif,png,bmp,txt,doc,docx,pdf,xls,xlsx,rtf" />


    It seems to work fine and I can manipulate the file in the Attachment_UploadComplete method and all looks good.  Within this method, I am using the OpenStream() to get a stream with which I am creating a copy of the uploaded file and a thumbnail Image when an image has been uploaded.

    However, I'm finding that once I'm done this is completed and I do something else, e.g. go to another page or click another unrelated button, my Session has been competely cleared out of data and is empty.  This is causing problems because I'm storing some unrelated data in the Session to store state about another part of the application.

    Any ideas why this may be happening?
    Filed under:
  •  09-10-2009, 11:18 AM 55537 in reply to 55515

    Re: Session is cleared after upload

    Hello again,
    This is not a problem caused by AjaxUploader.  My code was deleteing a directory within the web root which effectively wipes my session.
View as RSS news feed in XML
Powered by Community Server (Commercial Edition), by Telligent Systems