4 Answers, 1 is accepted
0
Accepted
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:
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:
The second site Web2 will transfer selected files directly to the handler of the Web1.
Regards,
Hristo Valyavicharski
Telerik
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
>
<
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
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
Hi Yuri,
Thank you for sharing your solution with the community.
Regards,
Hristo Valyavicharski
Telerik
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.