I am having some problem with the telerik uploader. I am getting an exception while uploading files.
The exception looks like the following:
=================================================
RadUpload Ajax callback error. Source url returned error: 12002
Unknown
Telerik.RadUploadProgressHandler.ashx?RadUrid=29d555ef-4d9a-451e-9f1a-cf074b7a8374
Did you register the RadUploadProgressHandler in web.config?
Please, see the help for more details: RadUpload for ASP.NET Ajax - Configuration - RadUploadProgressHandler.
===================================================
Although I registered RadUploadProgressHandler in the webconfig properly. Here is my web config registration of RadUploader :
====================================================
<
system.web>
<httpHandlers>
<
remove verb="*" path="*.asmx"/>
< add verb ="*" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler, Telerik.Web.UI"/>
</
httpHandlers>
<
httpModules>
<
add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI" />
</httpModules>
</system.web>
====================================================
Any suggestions about this problem would be highly appreciated.
-- Sadeka
8 Answers, 1 is accepted
I've some more codes to share with u all.
My Rad Uploader implementation goes like the following :
====================================================
<
tel:radupload id="RadUpload1" CssClass="RadUpload_BrandShare" OnClientAdded="MakeRuInputFieldsNonEditable" OnClientFileSelected="SetPageIsSaved"
runat="server"
initialfileinputscount="5"
EnableEmbeddedSkins="false"
EnableFileInputSkinning="true"
overwriteexistingfiles="false"
Width="320"
InputSize="47"
ReadOnlyFileInputs="true"
AllowedFileExtensions=".jpg,.eps,.ai,.psd,.tiff,.tif,.jpeg,.pdf"
MaxFileSize="36700160"
/>
====================================================
My Rad Progress Area is like the following :
====================================================
<tel:RadProgressManager id="progressManager" runat="server" />
<tel:radprogressarea id="progressArea1" runat="server" EnableEmbeddedSkins="false" OnClientProgressUpdating="ProgressBarUpdate" DisplayCancelButton="true" CssClass="RadUpload_BrandShare" style="float:left; width:258px;margin-bottom:-15px;" >
<progresstemplate>
<b class="fontSize"><%=Lang("Upload in progress ") %></b><hr style="position:relative;margin-left:0px;margin-right:6px;margin-top:-5px;color:Black;height:1px;"/>
<b class="fontSize"><%=Lang("Uploaded images : ")%><span runat="server" id="SecondaryValue"></span><span class="fontSize"> / </span><span runat="server" id="SecondaryTotal"/><br /></b>
<span runat="server" id="CurrentOperation" style="word-wrap:break-word;"></span><br /><br />
<b class="fontSize"><%=Lang("Percent Ready ") %><br /></b><span runat="server" id="PrimaryPercent"></span><span class="fontSize"> % </span>
<input type="button" id="Cancel_Upload" value='<%= Lang("Cancel Upload") %>' onclick="cancelUpload()" style="position:relative;float:right;bottom:18px;margin-right:-30px;height:18px; z-index:20000;" class="fontSize"/>
</progresstemplate>
</tel:radprogressarea>
<
script type="text/javascript">
var
cancel=false;
function
ProgressBarUpdate(progressArea,args)
{
progressArea.updateVerticalProgressBar(args.ProgressBarElement, args.ProgressValue);
progressArea.cancelClicked=cancel;
if(cancel)
ProgressInvisible();
return false;
}
</script>
====================================================
UploadButtonClicked event handler is as follows:
====================================================
protected void UploadButtonClicked(object sender, EventArgs e)
{
RadProgressContext progress = RadProgressContext.Current;
progress[
"SecondaryValue"] = RadUpload1.UploadedFiles.Count.ToString();
Pictures =
new PictureCollection();
foreach (UploadedFile file in RadUpload1.UploadedFiles)
{
string fileNameWithGuid;
string filePath = _Presenter.GetFilePath(file.GetName(), out fileNameWithGuid);
Picture picture = new Picture();
picture.LocatedAt = filePath;
picture.Src=fileNameWithGuid;
Pictures.Add(picture);
file.SaveAs(filePath,
true);
}
_Presenter.CheckForInvalidFiles(RadUpload1.InvalidFiles.Count, RadUpload1.UploadedFiles.Count, Pictures);
if (_Presenter.TransitionToDescribePicturesAllowed())
LoadJsField.Value +=
"SetPageIsSaved(); GotoDescribePictures();";
}
====================================================
In my IIS , I have uncheked the checkboxes for *.ashx and *.aspx.
Can anyone pls look into this matter?
~ Regards,
Sadeka
Maybe you host your application in IIS7?
If so, have in mind that RadMemoryOptimization is not compatible with IIS7 and will be disabled if you develop using Windows Vista. RadProgressArea will not be operational in this environment as well.
Regards,
Veskoni
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
No, my IIS is not the 7.0 version. It's something lower. but I have some findings to be shared with you.
This warning actually shows up when we have multiple users trying to upload several files (say, 5 to higher) which consumes lots of memory of the server.
The file size and the number of files appear to be a constraint in this case.
Please let me know if u have any update on this issue.
Thanks and kind regards,
Sadeka.
Can you give us a live URL where we can test this?
Also, I recommend that you upgrade to the latest "Futures" build, released yesterday. More information is available
here: http://www.telerik.com/community/forums/thread/b311D-bemgdc.aspx
Regards,
Veskoni
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
You have to ensure that the file names (in the .SaveAs() call) are unique. Consider the following: two users upload two files with the same name. The files get uploaded the same time. While the system saves the file of the fist user, there is an open handle to that file name and the second SaveAs call fails.
Regards,
Paul
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Rick
No, this won't happen if the two files are saved to different folders on disk. Still, have in mind that if the folder is determined per-user, it could happen that a single user opens two browsers and uploads the same file.
All the best,
Paul
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.