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

Sharepoint - Anyone gotten this control working in SP?

21 Answers 148 Views
Upload
This is a migrated thread and some comments may be shown as answers.
yutz
Top achievements
Rank 1
yutz asked on 26 Feb 2009, 05:03 PM
I got the control to load. However, after I pick the file(s) to upload I get the following error. I'm guessing that there is something wrong with either the TargetFolder or ServerUrl I've specified.

Any ideas?

throw new Error("Unhandled Error in Silverlight 2 Application    at System.Net.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)\n   at System.Net.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)\n   at Telerik.Windows.Controls.FileUploader.OnResponse(IAsyncResult asyncResult)\n   at System.Net.BrowserHttpWebRequest.<>c__DisplayClassd.<InvokeGetResponseCallback>b__b(Object state2)\n   at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)\n   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)\n   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)\n   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)");

21 Answers, 1 is accepted

Sort by
0
Ivan
Telerik team
answered on 27 Feb 2009, 12:04 PM
Hi Jon,

Please follow the steps bellow:
  • Check information initialized in UploadServiceUrl and TargetFolder;
  • If the info is OK (the paths are the correct ones), please try to access the upload handler directly in your browser and check whether the response looks like:
     
    {"JSONData":[{"Key":"RadUAG_message","Value":"Empty file name"},{"Key":"RadUAG_success","Value":false}]}
  • If the response is OK please check whether the target folder is physically available and the access rights are OK;
  • A possible reason may be if you are trying to upload across different domains. If this is the case please follow the instructions at Making a Service Available Across Domain Boundaries.
Please follow the above suggestions and let me know if you have further questions.

Best wishes,
Ivan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
spicolly
Top achievements
Rank 1
answered on 07 Apr 2009, 03:08 PM
The reason I got this error was b/c the web server was running in Trust-Level-Medium, so I was unable to access the UploadHandler.ashx. 
0
Valentin.Stoychev
Telerik team
answered on 07 Apr 2009, 03:14 PM
Hi spicolly,

This is already fixed and the bits will be available later this week as part of the SP release.

Greetings,
Valentin.Stoychev
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
John
Top achievements
Rank 1
answered on 29 Nov 2010, 11:03 PM
I am trying to replicate this functionality:

http://tv.telerik.com/watch/silverlight/video/telerik-silverlight-controls-and-sharepoint-2010-part-5

(Uploading Large Files into SharePoint by using Telerik SilverLight...)

I can get my handler to work if I derive from iHttpHandler, but when I try to derive from RadUploadHandler, I get 401 errors.

Is this becuase the example just won't work with Integrated Windows Authentication?

Thanks,
John
0
Alex Fidanov
Telerik team
answered on 01 Dec 2010, 06:24 PM
Hello John,

Can you please tell us which version (build) of the Telerik assemblies you are using?

All the best,
Alex Fidanov
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
John
Top achievements
Rank 1
answered on 01 Dec 2010, 06:29 PM
Hi Alex, thanks for looking into this!

The file version of RadUploadHanlder I am referencing is : 2010.3.1110.35.  It is the trial version of 'RadControls for Silverlight Q3 2010'

-John
0
Alex Fidanov
Telerik team
answered on 06 Dec 2010, 07:53 PM
Hello John,

We are going to look into this, but we will need some time to test this in a real Share Point project. If you have one at hand, it would be great if you sent it to us. Otherwise, I will update you as soon as I have more information on this issue.

All the best,
Alex Fidanov
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Alex Fidanov
Telerik team
answered on 09 Dec 2010, 01:15 PM
Hi John,

Please take a look at this forum post about windows authentitcation and RadUpload. You can also review this link about share point windows authentication. Please let us know if they are helpful.

Regards,
Alex Fidanov
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Venkata Nagendra Rao
Top achievements
Rank 1
answered on 27 Jan 2011, 05:51 AM
Hi John,

I faced the same problem and found that different versions of telerik DLL's works in different way. Just run the fiddler and see where it trying to find the handler file. in my case ~ made a big difference with different versions of the telerik DLL's one version looks at the root of the folder and the other version looks at the current folder. I dont why this should make a big difference.

Regards,
Nagendra
0
Tina Stancheva
Telerik team
answered on 01 Feb 2011, 12:54 PM
Hi Venkata Nagendra Rao,

First of all, let me assure you that whenever we are updating our controls, we do our best to keep a backward compabilty and not introduce many changes in the logic of the controls.

However, the RadUpload control was significantly improved since its initial implementation. I am not sure what version of the controls you are using, but currently if the path to the UploadHandler begins with "/" or "~/" then it is relative to the root of the domain where the Silverlight application had been loaded.

I hope this info will help you. Still, if you have any issues, please let us know and we will gladly assist you in implementing your scenarios with our controls.

Regards,
Tina Stancheva
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Pinaki
Top achievements
Rank 1
answered on 28 Jan 2012, 02:15 PM
Hello Readers.
I have been facing this problem for two days now. I'm using the trail version of Telerik silverlight (the latest version I can dowload today) and using it in SP 2010 (running locally on Vista 64-bit) on my laptop.

I have the .ashx file in the layouts folder (just as demonstrated in the video by Sahil Malik) and the .ashx.cs in the root of the solution for SP2010.

Strangely enough, if the handler class is derived from iHttpHandler,   all works fine, and I hit a breakpoint  as expected. But if I derive my handler class from RadUploadHandler, I get the error "Handler not found....."

So, apparently the path is ok. Can someone help?. I'm feeling it has something to do with the Telerik.Windows.RadUploadHandler DLL?

Any help will be appreciated.

Thank you.

0
Venkata Nagendra Rao
Top achievements
Rank 1
answered on 28 Jan 2012, 02:42 PM
Hi,

Try running fiddler and see what is the path of handler the request is trying to hit.

Regards,
Nagendra
0
Pinaki
Top achievements
Rank 1
answered on 28 Jan 2012, 04:10 PM
Hello Nagendra.
Thanks for the response.

I'm not very familiar using Fiddler. I have it installed. Can you tell me what I should be checking?
I do get a 404 error though.
As I had mentioned, the path should be ok?

What I do not understand is why I get a 404, if the handler class is derived from RadUploadHandler, but I actually hit a breakpint just fine in my cs code, if the class is derived from iHtttpHandler?.

In both case, I'm not changing the path at all.


0
Venkata Nagendra Rao
Top achievements
Rank 1
answered on 28 Jan 2012, 04:56 PM
Run fiddler and then run the application to find each requests traced in fiddler. once we have the requests we can find the error and trace it back. It should be running in the web folder and also be deployed into web application from where the silverlight application is running. Specify the service url explicitly with out the full path so that the necessary url is constructed.
0
Tina Stancheva
Telerik team
answered on 30 Jan 2012, 01:16 PM
Hi Pinaki,

The RadUploadHandler handles the upload requests properly in a SharePoint enviroment on condition that:

1. In the UploadHandler.ashx file definition, you need to indicate the full assembly name of the assembly that contains the class that will handle the upload requests. For example if the UploadHandler class should handle the requests and it is in the UploadProject assembly, the following line has to be included in the UploadHandler.ashx file definition:

<%@ WebHandler Language="C#" Class="UploadProject.UploadHandler, UploadProject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3173a0160b767e01" %>

 2. Include the Telerik.Windows.RadUploadHandler.dll into the SharePoint project Package - To ensure that the Telerik.Windows.RadUploadHandler.dll is included in your WSP you have to open the Package Configuration - just open the "Package" node in your SharePoint project and then double click the given entry. Scroll down to the end of the screen and open the Manifest. Make sure it contains the following line:

<Assembly Location="Telerik.Windows.RadUploadHandler.dll" DeploymentTarget="GlobalAssemblyCache"/>

If it doesn't, that means that the Telerik.Windows.RadUploadHandler.dll isn't included in the Package. In order to include it you need to open the Advanced mode. Then use the Add button to Add Existing Assembly and select the Telerik.Windows.RadUploadHandler.dll.

You can examine this forum thread as it will give you further information and you can also download a sample solution demonstrating how to use the RadUpload control in a SharePoint enviroment.

Let us know if the information helps.

Regards,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Pinaki
Top achievements
Rank 1
answered on 22 Feb 2012, 11:45 AM
Hi Tina.
Thank you
The solution you mentioned  worked for me only when this is a farm solution.

My challenge is that I need to make this work within a Sandbox solution. So, unlike all the examples and videos mentioned and illustrated here, I cannot use the LAYOUTS folder withing my Visual studio solution.
So, my question is, where should the Uploadhandler.ashx and the UploadHandler.cs be placed?.

Can anyone help and let me know on this?. Where exactly do you keep the handlers, so it works in a Sandbox solution?

Thank you.

0
Tina Stancheva
Telerik team
answered on 27 Feb 2012, 12:09 PM
Hi Pinaki,

There isn't a required place for the UploadHandler. The only requirement is that the Silverlight client-part with the RadUpload control needs access to the upload handler. This is why you can place it in any shared folder/accessible destination on any of your servers as long as the client-side of the RadUpload can access it.

All the best,
Tina Stancheva
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Pinaki
Top achievements
Rank 1
answered on 04 Mar 2012, 02:05 PM
Hi Tina.
Thanks again.
The problem I have now is that althogh I've put the code in the markup in the same file .ASHX and not separate .cs file, this was needed since it is a sandbox solution.
Forget the radupload control, but I'm not even gettiing the JSON back from the handler itself. The handler can't find the Telerik RadUpload DLL.
Mind you I've already included the DLL in my package manifest. Here is what it looks like:

<Solution xmlns="http://schemas.microsoft.com/sharepoint/" SolutionId="55505cf1-886e-4783-a24d-3c40737db3cc" SharePointProductVersion="14.0">
  <Assemblies>
    <Assembly Location="Telerik.Windows.RadUploadHandler.dll" DeploymentTarget="GlobalAssemblyCache" />
    <Assembly Location="SandBoxFileUpload.dll" DeploymentTarget="GlobalAssemblyCache" />
  </Assemblies>
  <FeatureManifests>
    <FeatureManifest Location="SandBoxFileUpload_Feature1\Feature.xml" />
  </FeatureManifests>
</Solution

But when I try to check the handler itself, instead of getting the JSON data I get error that the DLL is not found. I'm now lost.
Can you help?.

If this helps this solotion works perfectly if this was a farm solution, and I had a _layouts folder. But that is not the case, and I need to work in a sandbox solution.


0
Tina Stancheva
Telerik team
answered on 05 Mar 2012, 10:22 AM
Hi Pinaki,

I already posted an answer in your other thread, still in case someone is following this thread as well, I will post the same information here:

When you add the Assembly tag with the Name property, the handler will be looking for the targeted assembly in the GAC. This is why you need to make sure that the Telerik.Windows.RadUploadHandler.dll is in the GAC.

Kind regards,
Tina Stancheva
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Pinaki
Top achievements
Rank 1
answered on 14 Mar 2012, 11:06 PM
Hi Tina.
Thank you for the answeer. It did not solver my problem though.
If my  class code is inside the same file .ASHX (no code behind) then it works perfectly, if I put the RadUploadHandler in the GAC. However, please note this is not an acceptable solution. I need to deply in a SharePoint Sandbox solution. This means no assembly in the GAC either.
So, my question is how to make it work, without putting the RadUploadHandler in the GAC. If I put a code behind, of the handler in a separate .cs file, will this work?. And if so, where do i place the .cs file?.

Thank you.
0
Tina Stancheva
Telerik team
answered on 16 Mar 2012, 03:11 PM
Hello Pinaki,

Unfortunately I am not aware of other approaches for implementing your solution.

All the best,
Tina Stancheva
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
Upload
Asked by
yutz
Top achievements
Rank 1
Answers by
Ivan
Telerik team
spicolly
Top achievements
Rank 1
Valentin.Stoychev
Telerik team
John
Top achievements
Rank 1
Alex Fidanov
Telerik team
Venkata Nagendra Rao
Top achievements
Rank 1
Tina Stancheva
Telerik team
Pinaki
Top achievements
Rank 1
Share this question
or