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

RadUpload Error

8 Answers 265 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Sadeka
Top achievements
Rank 1
Sadeka asked on 01 Jul 2008, 05:06 AM
Hi All,

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

Sort by
0
Sadeka
Top achievements
Rank 1
answered on 01 Jul 2008, 09:56 AM
Hi All,

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

0
Veselin Vasilev
Telerik team
answered on 03 Jul 2008, 04:47 PM
Hello 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
0
Sadeka
Top achievements
Rank 1
answered on 08 Jul 2008, 04:42 AM
Hello Veskoni,

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.

0
Veselin Vasilev
Telerik team
answered on 09 Jul 2008, 12:58 PM
Hi 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
0
Richard
Top achievements
Rank 1
answered on 08 Oct 2008, 06:08 PM
I am having the same issue although I am on IIS 7.0.  I have the site running under a classic application pool, and the RAD progress works fine.  Although a number of concurrent uploads that are large in size causes a failure (which from the previous comments seems to be the problem with IIS 6.0 and IIS 7.0). 
0
Paul
Telerik team
answered on 09 Oct 2008, 10:58 AM
Hello Richard,

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.
0
Richard
Top achievements
Rank 1
answered on 09 Oct 2008, 12:01 PM
Would this problem still occur in the case that the two files were being saved to different folders on disk?

Rick
0
Paul
Telerik team
answered on 09 Oct 2008, 01:58 PM
Hi Richard,

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.
Tags
Upload (Obsolete)
Asked by
Sadeka
Top achievements
Rank 1
Answers by
Sadeka
Top achievements
Rank 1
Veselin Vasilev
Telerik team
Richard
Top achievements
Rank 1
Paul
Telerik team
Share this question
or