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

Cross domain Radupload

4 Answers 106 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Gilberto
Top achievements
Rank 1
Gilberto asked on 24 Sep 2009, 06:53 PM
Can i use Radupload / handlers and progress to upload files in a cross domain scenario?

Thanks

4 Answers, 1 is accepted

Sort by
0
Accepted
Hristo Valyavicharski
Telerik team
answered on 25 Dec 2013, 09:02 AM
Hi,

The attached sample, shows how to upload files in cross domain scenarios with RadAsyncUpload. The sample contains two websites -Web1 and Web2. The Web1 is the website that contains the custom handler. It is configured to accept cross domain requests: 
<httpProtocol>
  <customHeaders>
    <add name="Access-Control-Allow-Origin" value="*" />
    <add name="Access-Control-Allow-Headers" value="Origin,cache-control,content-type,man,messagetype" />
  </customHeaders>
</httpProtocol>
and should be hosted on the file server, where the files will be uploaded. Note that on this server you must have temporary folder, which is the same as configured in the Web2: 
<telerik:RadAsyncUpload
    ID="RadAsyncUpload1"
    DisablePlugins="true"
    TemporaryFolder="C:\\Temp\"
    EnablePermissionsCheck="false"
    runat="server">
</telerik:RadAsyncUpload>

The second site Web2 will transfer selected files directly to the handler of the Web1. 

Regards,
Hristo Valyavicharski
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Yuri
Top achievements
Rank 1
answered on 07 Apr 2014, 05:04 PM
Hi Hristo,

I tried your solution and it works fine in all browsers except of IE9 and bellow versions of IE.
I have unheralded javascript exception in the browsers.
As I understand from your javascript code, there is problem with iFrame access.
I have such structure:
Handler on - subdomain1.test.com
Web site with control on -  subdomain2.test.com
Could you please help me with the problem?

Best Regards,
Yuri
0
Yuri
Top achievements
Rank 1
answered on 09 Apr 2014, 10:13 AM
I found some workaround for the problem. I described it on my blog: http://tech.panshin.me/development/telerik-cross-domain-radasyncupload.html
0
Hristo Valyavicharski
Telerik team
answered on 10 Apr 2014, 02:44 PM
Hi Yuri,

Thank you for sharing your solution with the community.

Regards,
Hristo Valyavicharski
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Upload (Obsolete)
Asked by
Gilberto
Top achievements
Rank 1
Answers by
Hristo Valyavicharski
Telerik team
Yuri
Top achievements
Rank 1
Share this question
or