locked
ClientAccessPolicy issue...I think. RRS feed

  • Question

  • First off I have my ClientAccessPolicy.xml file in the root of my website.(see content below)

    When I l navigate to my website using my domain name http://www.mydomain.com, login and hit the page that has my silverlight control on it, the silverlight window shows the spinning % up until abouty 98%, then it stops and nothing happens.

    Our web servers are in a datacenter and we have a vpn setup from our offices. 

    When I l navigate to my website using the machine name http://machinename, login and hit the page that has my silverlight control on it, if works great.

    The sliverlight xap file has a ServiceReferences.ClientConfig file that points to my service using the domain name http://www.mydomain.com/myservice/myservice.svc.

    This must be a cross domain issue, but I can't figure it out.  Any ideas? 

     

    <?xml version="1.0" encoding="utf-8" ?>

    - <access-policy>
    - <cross-domain-access>
    - <policy>
    - <allow-from http-request-headers="*">
      <domain uri="*" />
      </allow-from>
    - <grant-to>
      <resource path="/" include-subpaths="true" />
      </grant-to>
      </policy>
      </cross-domain-access>
      </access-policy>
    • Moved by mbanavige Thursday, March 18, 2010 9:19 PM Migration data
    Thursday, March 18, 2010 11:54 AM

Answers

  • Hi,

    The policy file seems ok. Please try using browser to access service outside domain, check if the issue related to service side. If the service are in same site with silverlight, try use this code line to locate the service address.

     var client = new serviceClient("bindingConfigurationName",
            new Uri(Application.Current.Host.Source,"/myservice/myservice.svc"));

    Also, Someone encountered issue that the service address can only located with IP address, use DNS always failed. Please test if using ip could solve the problem.

    Thanks,

    Monday, March 22, 2010 2:41 AM

All replies

  • Hi,

    The policy file seems ok. Please try using browser to access service outside domain, check if the issue related to service side. If the service are in same site with silverlight, try use this code line to locate the service address.

     var client = new serviceClient("bindingConfigurationName",
            new Uri(Application.Current.Host.Source,"/myservice/myservice.svc"));

    Also, Someone encountered issue that the service address can only located with IP address, use DNS always failed. Please test if using ip could solve the problem.

    Thanks,

    Monday, March 22, 2010 2:41 AM
  • Try to uninstall your Silverlight SDKs and reinstall the latest Silverlight SDK. By this time, it's Silverlight SDK version 4.x.

    Friday, October 14, 2011 12:34 AM