I've followed the instructions on extending the RadAsyncUploadHandler here, and I've encountered a very similar problem to this thread.
If you implement a custom AsyncUploadHandler and upload a file it works the first time, but each subsequent time you upload a file it fails with no explanation as why it failed. It works again after IISRESET or process reset. It seems this may have something to do with first upload session not being properly terminated, session or something along those lines.
It appears that this problematic behavior is also occurring on the latest Telerik assemblies too. I've included a simple project that reproduces the said behavior. Could you please let me know how to fix this? I need to use this feature of the RadAsycUpload so I can provide data about the parsed upload file back to the client without full page postback. Please let me know how I can get this working.
Thanks,
-James
[Files]
Project Files
Upload Test File
11 Answers, 1 is accepted
<telerik:RadAsyncUpload runat="server" ID="FileUpload1" MultipleFileSelection="Disabled" EnableInlineProgress="true"
HttpHandlerUrl="~/AsyncUpload.axd" OnFileUploaded="FileUpload1_FileUploaded">
</telerik:RadAsyncUpload>
SCRIPT5022: Error while uploading, HTTP Error code is: 500
Telerik.Web.UI.WebResource.axd, line 250 character 8
if(h){h(this,g);
}var i=g.get_handled();
if(!i){throw"Error while uploading, "+e;
We've confirmed that the handler and progress handlers are registered correctly in our web.config.
Thank you,
Gina
I have inspected the issue by testing RadAsyncUpload locally and on our online demo(where the settings of the control are almost the same as the ones you pointed and with RadAjaxPanel) but unfortunately could not achieve the same error. Here is a video of my test. Would you please review it and let me know if I am not testing properly or I have to add something else to observe the same issue?
I am attaching a sample web page with the isolated demo. Would you please let me now if the same behavior van be observed there as well?
Plamen
the Telerik team
I looked at your video and your not using my sample project I uploaded above. In an effort to get to the bottom of this, I copied the code exactly as is from here:
http://demos.telerik.com/aspnet-ajax/asyncupload/examples/imageuploader/defaultcs.aspx
And ran it against the 2012.2.607.35 telerik assembly and it still manifests the same problematic behavior. One other thing it looks like the code in the telerik provided demo is suspect because it says multiple uploads are disabled in code but you can upload multiple items still, so this makes me wonder what else is out of sync between whats working and the code that they've displayed as the "working code". Please advise.
Thanks,
-James
If you want to have only one uploading input in RadAsyncUpload you should set MaxFileInputsCount="1". While the multiple selection is not allowing the selection of more than one file at the same time (while holding shift button).
Hope this will be helpful.
Plamen
the Telerik team
Telerik.Web.UI.AsyncUpload.RadAsyncUploadScripts.js - line 6716
if(t.invalidFileSize){k.trigger("FileValidationFail","",q[s]);
Microsoft JScript runtime error: Unable to get value of the property 'invalidFileSize': object is null or undefined
If I do disable the plugins then it just blinks yellow with no error on the second upload. This is a real problem, please help. If you could provide some code that illustrates a working solution that would be great. The link you posted above doesn't fit the bill, I tried that code verbatim and it still manifests same problems on my server 2008 R2 box with IIS 7.5 on .Net 3.5, and the zip file that you included doesn't work at all against the Telerik dll version 2012.2.607.35.
The folder the file was uploaded to had rights issues!
Once I gave the appropriate rights to the IIs the problem was resolved !
Exception details can be found here: http://www.telerik.com/community/forums/aspnet-ajax/async-upload/null-exception-with-overridden-asyncuploadhandler.aspx.
Searching the forums seems to tell that this is a very common situation when overriding the AsyncUploadHandler. A real explanation would be greatly appreciated.
The issue is actually a bug on our side. In order to resolve it please overwrite the IsReusable property of your custom handler to return false. For details on how to do that, please follow the advices in the forum post you have linked.
Greetings,
Genady Sergeev
the Telerik team
bool IHttpHandler.IsReusable
{
get
{
return false;
}
}
Hi
I am using radasyncupload control.when i upload lengthy file name it allowing 130 character only.if i give more then that 131 it is give an error. Which i have attached herewith.Please response quickly.