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

What does this error mean?

3 Answers 67 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Dennis
Top achievements
Rank 1
Dennis asked on 24 Apr 2013, 06:34 AM
Hi:

I am evaluating Upload control. I download an example (from here: http://www.telerik.com/support/kb/silverlight/upload/uploadhandler-uniquefilename.aspx) and try. When I click on upload button,  I got the following error. What does it mean? I suppose the example should be working. What does the error mean? What should I do to make it work?

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)
Timestamp: Wed, 24 Apr 2013 06:22:07 UTC

Message: Unhandled Error in Silverlight Application
Code: 4004   
Category: ManagedRuntimeError      
Message: System.NotSupportedException: The URI prefix is not recognized.
   at System.Net.WebRequest.Create(Uri requestUri)
   at Telerik.Windows.Controls.UploadDispatcher.SendRequest(AsyncCallback callback)
   at Telerik.Windows.Controls.UploadDispatcher.UploadNextChunk()
   at Telerik.Windows.Controls.UploadDispatcher.Resume()
   at Telerik.Windows.Controls.UploadDispatcher.Start()
   at Telerik.Windows.Controls.RadUpload.UploadNextFile()
   at Telerik.Windows.Controls.RadUpload.StartUpload()
   at Telerik.Windows.Controls.RadUpload.<.ctor>b__0(Object p)
   at Telerik.Windows.Controls.DelegateCommand.Execute(Object parameter)
   at Telerik.Windows.Controls.RadButton.ExecuteCommand()
   at Telerik.Windows.Controls.RadButton.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.Controls.Control.OnMouseLeftButtonUp(Control ctrl, EventArgs e)
   at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)    

Line: 54
Char: 13
Code: 0
URI: file:///C:/Temp/Silverlight/RadUploadHandlerUniqueFileNameDemo/SLApp/Bin/Debug/TestPage.html

 
Thanks,

Dennis Huang

3 Answers, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 26 Apr 2013, 01:12 PM
Hello Dennis,

Please make sure to set the Web project as a StartUp project as otherwise the RadUpload client-side won't be able to find its server-side UploadHandler.

All the best,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Dennis
Top achievements
Rank 1
answered on 29 Apr 2013, 12:09 AM
Thanks, Tina:

I solved the problem in the same way. But I have another problem/question:
1. When I tried to remove one of selected files, I clicked the X button but it often doesn't work.
2. Can I invoke upload button from code and how can I pass some values to server because the file name must be saved as certain pattern?

Thanks,

Dennis Huang
0
Tina Stancheva
Telerik team
answered on 02 May 2013, 09:49 AM
Hello Dennis,

Please accept my apology for the delayed response. The "Remove" button issue is caused by the custom RadUploadItem ControlTemplate. I attached the solution with updated ControlTemplate and now it should work as expected.

As for invoking Upload from code-behind and passing parameters you can take a look at the following tutorials:

You can also examine the How To Use RadUpload Programatically KB article.

Please let us know if you have any additional questions.


Kind regards,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Upload
Asked by
Dennis
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Dennis
Top achievements
Rank 1
Share this question
or