Cross-domain access to the service when Silverlight calls WebService

Source: Internet
Author: User
Tags soap silverlight

Recently found in the project Silverlight call WebService a cross-domain access exception, the exception information is as follows:

"This could be because you tried to access the service across domains without an appropriate cross-domain policy, or if the policy does not apply to the SOAP service. You may need to contact the service owner to publish a cross-domain policy file to ensure that the policy allows the sending of SOAP-related HTTP headers. See internal exceptions for more information. ”

Found this problem, has been in the virtual directory under the east, try a variety of methods, because my site has a lot of subsites below, so in this now deployment WebService are added under the default site of the virtual directory, or applications.


In the Google process found that most of the need to add an XML file, ClientAccessPolicy.xml, file format and so on is not here to say. Have said to add to webservice in the directory, also said to add in the root directory. I tried it or not. My Default Web site and virtual directory are not in one directory, and I later tried to copy the project to the site directory, or not. After the search to an article that may be due to a virtual directory problem, I tried to create a new Web site, using another port. You can then put the ClientAccessPolicy.xml file in the root directory. Then use IP plus port access, but because the server's system is Server 2008, IIS is 7.0, in this machine can be opened, but the external network machine is not open. Looked for a long, later found that the operating system firewall filter The reason for the port, no language, a pass set, you can use the IP plus port access.

The picture won't go up. Trouble.

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.