
<rada:RadAsyncUpload ID="RadUpload1" runat="server" OnFileUploaded="RadAsyncUpload1_FileUploaded" OnClientFileUploadFailed="onUploadFailed"
ReadOnlyFileInputs="true" OnClientFileSelected="onFileSelected" OnClientFileUploaded="onFileUploaded" OnClientFileUploading="onFileUploading" TemporaryFolder="c:\temp" />
<script type="text/javascript">
var $ = $telerik.$;
var uploadsInProgress = 0;
function onFileSelected(sender, args) {
alert(
'4');
if (!uploadsInProgress)
$(
"#newupload").attr("disabled", "disabled");
uploadsInProgress++;
}
function onFileUploaded(sender, args) {
alert(
'3');
decrementUploadsInProgress();
}
function onUploadFailed(sender, args) {
alert(
'2');
decrementUploadsInProgress();
}
function decrementUploadsInProgress() {
alert(
'1');
uploadsInProgress--;
if (!uploadsInProgress)
$(
"#newupload").removeAttr("disabled");
}
function onFileUploading() {
alert(
'5');
}
</script>
The problem I'm having is that it never seems to properly be creating the temporary file. I see a file called "RadUploadTestFile" created, but with 0KB. And the progress bar never goes away. I don't get why it won't create the temporary file for me to upload to the final location later?
See attached image.
12 Answers, 1 is accepted
We will need some details regarding your scenario in order to troubleshoot the problem that you experience. Could you please answer the following:
1) What is the size of the file that you are trying to upload?
2) Which version of IIS do you use?
3) Do you use authentication/authorization enabled for your web-site?
4) Do you have the Telerik.Web.UI.WebResource.axd handler registered into your web.config?
Thank you.
Sincerely yours,
Genady Sergeev
the Telerik team

1. Filesize is a 149kb pdf
2. I am using IIS 7 in windows 7
3. I am using forms authentication on the website
4. I have the handler registered as follows in the web.config
<location path="Telerik.Web.UI.WebResource.axd">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
under system.webserver
modules
<add name="RadUploadModule" preCondition="integratedMode" type="Telerik.Web.UI.RadUploadHttpModule" />
handlers
<add name="Telerik_RadUploadProgressHandler_ashx" verb="*" preCondition="integratedMode" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" />
How about the registration of the Telerik.Web.UI.WebResource.axd handler in the handlers section, is it present? Just a side note, we have just release Q2 Service Pack 1. In Service Pack 1, RadAsyncUpload is equipped with new, more robust error handling. Now it will throw error codes in the console showing what is the exact error. I think that will greatly ease us in troubleshooting your problem. So, could you please try the latest service pack, open the FireBug (in FireFox) console and try to upload a file. An error code will appear if the upload process fail. Then paste the error code here. This will allow us to easily track your problem.
Sincerely yours,
Genady Sergeev
the Telerik team

Here are the answers to your first set of questions:
1) What is the size of the file that you are trying to upload? 18 KB
2) Which version of IIS do you use? IIS 6.0
3) Do you use authentication/authorization enabled for your web-site? I'm using integrated authentication for various pages in my site (including the form that contains the RadAsyncUpload control), but I've checked and double-checked again that I have anonymous access enabled on my root directory and my App_Code directory.
4) Do you have the Telerik.Web.UI.WebResource.axd handler registered into your web.config? Yes. Again, I've checked and double-checked that the web.config is setup correctly.
My control is very basic and is setup as follows:
<telerik:RadAsyncUpload runat="server" ID="rauAttachment" Skin="Web20" ReadOnlyFileInputs="True">
</telerik:RadAsyncUpload>
So following you instructions, I downloaded, installed, and am using the most recent version of the controls (Version=2010.2.826.35). I then opened up my form in FireFox so I could see the errors in FireBug... and, wouldn't you know it, the async upload worked perfectly in FireFox! Therefore, I have no errors to paste and show you. When using IE, I only receive a vague "unspecified error." I've attached a screenshot of the error message.
Any help you could provide would be greatly appreciated!!
Thank you,
Deanna
Can you try the following, open the IE Developer Toolbar and open the page that produced error. When the error happen you should be prompted whether do you want to debug. Click yes and paste and make a screenshot of the failing code. Then link the screenshot to here. Also, try adding Location tag in the web.config allowing for anonymous access to the Telerik.Web.UI.WebResource.axd handler. Please check this article for further reference.
Greetings,
Genady Sergeev
the Telerik team

I seem to be having an related error. When I opened the Console in FireFox nothing appeared but it is still broken. I opening it in Google Chrome and I got this error "Uncaught SyntaxError: Unexpected token < ScriptResource.axd:16" I have attached a screen shot of the error.
Thank you,
Chris

I tried to reproduce the issue once again but to no avail. I am attaching my test project. Would you please review it and let me know what else should be added to it in order to observe the described error and be more helpful?
Please have in mind that I have done my tested with latest version of RadControls please clarify the version you are using as well.
Plamen
the Telerik team

In our environment, the upload works fine on one server, but hangs, as described above, with the "SyntaxError: Unexpected token <" error in a different environment. Any suggestions or ideas would be appreciated!
Thanks!
Would you please let us know if you can reproduce the error with the sample web page I attached in my previous reply and what exactly file are you uploading to observe the error or it happens with all the files?
Plamen
the Telerik team

We had the same issue in one of our application environments.
The root cause was the misconfiguration of the app pool account not having write access to the app folder. As you're setting the temporary folder to c:\temp I would double check the app pool user has the appropriate privilege in that folder.
Hope it helps,

We had the same issue in one of our application environments.
The root cause was a mis-configuration of the folder security in Windows. Since you're setting the temp folder for the RAD upload to "c:\temp" I would suggest checking the application pool account has the appropriate write access in that folder.
Hope it helps,