This is a migrated thread and some comments may be shown as answers.

RadAsyncUpload causing file not found in IE9-7

5 Answers 300 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Jamie
Top achievements
Rank 1
Jamie asked on 20 Sep 2012, 01:03 AM

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?

5 Answers, 1 is accepted

Sort by
0
Jamie
Top achievements
Rank 1
answered on 20 Sep 2012, 01:04 AM
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?
0
Peter Filipov
Telerik team
answered on 24 Sep 2012, 08:38 AM
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.
0
Dawid
Top achievements
Rank 1
answered on 26 Sep 2013, 11:08 PM
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.
0
Peter Filipov
Telerik team
answered on 01 Oct 2013, 08:51 AM
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.
0
Dawid
Top achievements
Rank 1
answered on 03 Oct 2013, 01:58 AM
Thanks Peter,

This seems to have done the trick.

Cheers.
Tags
AsyncUpload
Asked by
Jamie
Top achievements
Rank 1
Answers by
Jamie
Top achievements
Rank 1
Peter Filipov
Telerik team
Dawid
Top achievements
Rank 1
Share this question
or