Intermittent problem with temporary file directory not being available

Last post 08-03-2010, 1:33 PM by debdba. 2 replies.
Sort Posts: Previous Next
  •  08-02-2010, 10:52 AM 62940

    Intermittent problem with temporary file directory not being available

    I'm using the Ajax Uploader, automatic upload not manual.  Occasionally users get a message that says:
     
    Unable to find the uploaded file in directory: E:\....\UploaderTemp
    - (at that point on the screen, the progress bar is sitting at 100% and Cancel button is still showing)
    - (UploaderTemp is the temp file directory listed on the CuteWebUI:Uploader control:
    tempdirectory="~/UploaderTemp")
     
    The theory here is that because we have load balancing turned on on our servers, that the upload to the temp file directory works, goes to the UploaderTemp directory on that server, then the File Uploaded event takes place in another thread which goes to a different server, goes to find the tempfile to save it into our database and can't find it in the /UploaderTemp directory on that  other server. 
     
    Could that be what's happening, based on the way the Ajax Uploader works?
     
    You gave me in another post, a link to the sequence of events: 
    http://cutesoft.net/forums/post/56964.aspx
     ---------------------------------------------
    Rob Nagel ,
     
    the order of the events are :
     
    client side select multiple files
    client show file1 uploading
    server fire FileValidating event
    client show file1 finish
    client show file2 uploading
    server fire FileValidating event
    client show file2 finish
    ...
    client side fire Postback event
    server side fire FileUploaded event for each file
    server side fire UploadCompleted event
     
    If you move/delete the temp file in FileValiding event, the FileUploaded of that file will not fire.
     
    So you can resize the image , but please keep the filepath , and then move it in FileUploaded event.
     
    Regards,
    Terry
    ----------------------------------
     
    So this looks like  there's a postback between the upload of our one file and the FileUploaded event that saves the temp file.  Is that true?
     
    Is there anyway to  process the uploaded file in the same thread that receives the file so we're guaranteed to still be on the same server?
     
    Thanks,
    Debbie
  •  08-02-2010, 8:12 PM 62967 in reply to 62940

    Re: Intermittent problem with temporary file directory not being available

    Hi,
     
    when you use load balancing and get "Unable to find the uploaded file in directory: E:\....\UploaderTemp ",
     
    you need configure a shared file server to store the temp files.
     
    set the TempDirecotory=\\sharedserver\tempfolder
     
    if you get security issue, fill username/password into web.config
     
    <add key="CuteWebUI.AjaxUploader.WindowsUsername" value="Terry" />
     <add key="CuteWebUI.AjaxUploader.WindowsPassword" value="12345abcde" />
     <add key="CuteWebUI.AjaxUploader.WindowsDomain" value="" />
     
    or use custom file provider  to store the file into same place:
     
     
    Regards,
    Terry
     
     
     
     
  •  08-03-2010, 1:33 PM 63038 in reply to 62967

    Re: Intermittent problem with temporary file directory not being available

    Thanks.  That's what we figured but the powers that be said that introduces a single point of failure, which I guess is true.  SO, we made the directory containing the page where the imageuploader is called from "sticky."  (persistent?)  That seemed to solve the problem, too.
     
    Appreciate your help.
View as RSS news feed in XML