RadAsyncUpload causing file not found in IE9-7

6 posts, 0 answers
  1. Jamie
    Jamie avatar
    3 posts
    Member since:
    Sep 2012

    Posted 19 Sep 2012 Link to this post

    I am getting the following error when I try to do an upload using only IE9-7, rest of the browsers work:

    Server Error in '/' Application.

    Could not find file 'F:\sitesroot\0\App_Data\RadUploadTemp\dof1fnv1.uib'.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.IO.FileNotFoundException: Could not find file 'F:\sitesroot\0\App_Data\RadUploadTemp\dof1fnv1.uib'.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [FileNotFoundException: Could not find file 'F:\sitesroot\0\App_Data\RadUploadTemp\dof1fnv1.uib'.]
       System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +12893271
       System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath) +2481
       System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) +229
       System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) +102
       Telerik.Web.UI.AsyncUploadedFile.get_InputStream() +86
       WebRole1.UploadImage.RadAsyncUpload1_FileUploaded(Object sender, FileUploadedEventArgs e) +1434
       Telerik.Web.UI.RadAsyncUpload.RaisePostDataChangedEvent() +178
       System.Web.UI.Page.RaiseChangedEvents() +309
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3468
    


    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272            


    I have verified the following:

    1. That the temporary file IS begin created in that directory
    2. That the directory is correct
    3. User permissions for the folder have read/write/modify access
    4. Tried the fix using a customupload handler here but didnt change anything:

    http://www.telerik.com/community/forums/aspnet-ajax/async-upload/known-issues-and-breaking-changes.aspx

    5. It works correctly on our test site but not our production site. I tried giving permissions to every user I could think of but still no luck. How could it be able to write the file but not be able to find it?

  2. Jamie
    Jamie avatar
    3 posts
    Member since:
    Sep 2012

    Posted 19 Sep 2012 Link to this post

    By the way, we are running 4 instances on Windows Azure, where only 1 on our test site. Could RadAsyncUpload be connecting to one of the other instances after uploading the temporary file?
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 24 Sep 2012 Link to this post

    Hi Jamie,

    Here is how the RadAsyncUpload control works.
    When Silverlight or FileAPI module is used the control is uploading the selected file on chunks(2MB each). The file is uploading into a Temporary folder and assembles there after every request. Even if a custom handler is used the files are upload in the temporary folder. After the upload is complete you could access them. In case of web farm the temporary folder should be a shared folder, because the control needs to assemble the uploading file's chunks in a same location. Here is a microsoft's blog post how to create a share drive under Azure.

    Regarding the working cases probably some of your users are uploading files less than 2MB or some of the other 2 modules are used(Flash/IFrame) and that's why it is working properly.

    In Q3.2012 we are going to introduce DisableChuckUpload property which will send a file to the handler with only one request.

    In case that you could not create a shared location,  please add the following code before the declaration of the RadAsyncUpload control until the new release come. It will force the control to use IFrame module.

    Telerik.Web.UI.RadAsyncUpload.Modules.Flash.isAvailable = function () { return false; };
    Telerik.Web.UI.RadAsyncUpload.Modules.FileApi.isAvailable = function() { return false; };
    Telerik.Web.UI.RadAsyncUpload.Modules.Silverlight.isAvailable = function() { return false; };



    All the best,
    Peter Filipov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  5. Dawid
    Dawid avatar
    6 posts
    Member since:
    Jan 2012

    Posted 26 Sep 2013 Link to this post

    Hi guys,

    I'm experiencing this same issue with IE9.

    So, I've tried all the things Peter said, we're on a much newer version "2013.1.417.40" though and hosted locally not on a web farm.

    Also tried the new DisableChunkUpload, DisablePlugins and every combination thereof.

    The same file works fine in Chrome and IE10 (with or without silverlight/and or flash installed), but IE9 gives the file not found error.  It's even stranger, because the JSON request seems to work and comes back with a 200 OK response, I can see the details, but no file appears in the Temp folder (it does on the newer browsers).

    I'll mention that we're using a custom upload handler to work with an AntiXSS library and the code is simply :

    protected override IAsyncUploadResult Process(UploadedFile file, HttpContext context, IAsyncUploadConfiguration configuration, string tempFileName)
    {
    return CreateDefaultUploadResult<UploadedFileInfo>(file);
    }

    As mentioned, works fine in newer browsers.
    I've tried adding debug logging, but these never seem to be hit when using IE9 (so the JSON result comes back, but "Process" never seems to be executed).

    Also only occurs on the Upload button click event handler (FileUploaded event handler never gets called via IE9).

    Any ideas where I can continue looking?

    Thanks.
  6. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 01 Oct 2013 Link to this post

    Hi Dawid,

    Here is my suggestion what might happening at your side.
    The base implementation of the Process method is replaced and when the upload is used under IE9 and lower versions the file is not saved because IFrame module is used and the file is uploaded with form submission. Please invoke the following line of code in the process method:
    SaveToTempFolder(file, configuration, context, tempFileName);

    Regards,
    Peter Filipov
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  7. Dawid
    Dawid avatar
    6 posts
    Member since:
    Jan 2012

    Posted 02 Oct 2013 Link to this post

    Thanks Peter,

    This seems to have done the trick.

    Cheers.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017