none
Could not find clientaccesspolicy.xml or crossdomain.xml file

    คำถาม

  • Hi,

    I have followed to the letter the examples given for the listservice example at:http://msdn.microsoft.com/en-us/library/gg298977(v=sql.110).aspx

    And have a SLOOB app talking to and syncing successfully with a sync service...all good.

    I howver have been struggling to get the service to read the clientaccess and crossdomain files, even though they are in the same directory as the service.

    When running http://localhost/listservice/DefualtscopeSyncService.svc/$diag (have set service to run in iis as in: http://msdn.microsoft.com/en-us/library/gg299070(v=sql.110).aspx (Deploying Service to IIS)), it must be noted that same issue even if run under native VS 2010 web server.

    eveything is fine except the diagnostic test for ClientAccessPolicy.xml/CrossDomain.xml files which reads:

    Could not find clientaccesspolicy.xml or crossdomain.xml file. Silverlight clients invoking the service from another domain will be unable to make requests successfully.

    I have followed the guidlines at: http://msdn.microsoft.com/en-us/library/cc197955(v=vs.95).aspx (Making a Service Available Across Domain Boundaries), but still get this problem, very strange. I have looked on countless forums and they all seem to point to the same links.

    I have put fiddler trace on as well as installed the help tool recomended by tim heur: http://projects.nikhilk.net/WebDevHelper/, but noethr of these give me any more info

    Can someone please help me where to check next???

    p.s. have attached details below:

    1) locations:

    - of service : c:\inetpub\wwwroot\listservice\DefualtscopeSyncService.svc

    - of clientaccesspolicy.xml and crossdomain.xml: c:\inetpub\wwwroot\listservice\

    2) crossdomain.xml

    <?xml version="1.0"?>
    <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
    <cross-domain-policy>
      <allow-http-request-headers-from domain="*" headers="SOAPAction,Content-Type"/>
    </cross-domain-policy>

     

    3) clientaccesspolicy.xml

     <?xml version="1.0" encoding="utf-8" ?>
    <access-policy>
    <cross-domain-access>
    <policy>
    <allow-from http-request-headers="SOAPAction">
    <domain uri="http://*"/>
    <domain uri="https://*" />
    </allow-from>
    <grant-to>
    <resource include-subpaths="true" path="/"/>
    </grant-to>
    </policy>
    </cross-domain-access>
    </access-policy>

     

    26 มกราคม 2555 17:24

คำตอบ

ตอบทั้งหมด