Cross-Site Policy and Cross-site policy file of Silverlight

Source: Internet
Author: User

If we need to call web service across sites in Silverlight, this problem may occur: by default, Silverlight does not allow you to do so. So how can we solve this problem? Please refer to the following section in Tim.Article

Http://timheuer.com/blog/archive/2008/04/06/silverlight-cross-domain-policy-file-snippet-intellisense.aspx

In short, Silverlight does not support cross-site calls, but checks a file first.Clientaccesspolicy. xmlIf the file cannot be found, find another file.Crossdomain. XML,If you cannot find it, an error is reported.

This problem can be easily identified through the monitoring tool.

 

If you are starting to get into integrating web servicesSilverlight, You'll notice that you have to have a cross domain policy file in place onTargetServer, that is to say, the server hosting the service you want to implement. there are some public web services (Flickr, YouTube, Digg, etc .) that already have these files in place for flash, but implement in a slightly different way.

When calling a cross-domain service, Silverlight will check for the existenceClientaccesspolicy. xmlFirst. This is the format defined by Silverlight and provides a pretty flexible way to define who can access what services. If not found, it will then default to lookCrossdomain. xml, Which is the file format implemented for Adobe Flash. It is important to note that this file will also still work for most public web services.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.