Could not find clientaccesspolicy.xml or crossdomain.xml file

已答覆 Could not find clientaccesspolicy.xml or crossdomain.xml file

  • 26 มกราคม 2555 17:24
     
     

    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>

     

ตอบทั้งหมด

  • 27 มกราคม 2555 1:10
    ผู้ดูแล
     
     
    try moving your policy files to the website root
  • 27 มกราคม 2555 8:31
     
     

    Hi,

    Forgot to mention, also tried that as well, but still same issue

  • 27 มกราคม 2555 17:29
    ผู้ดูแล
     
     

    can you dump a fiddler trace while accessing the policy files?

    i have the same exact url as yours and it works just fine.

  • 27 มกราคม 2555 18:40
     
     

    hi,

    dunping session to raw files just shows same xml, (as below), what authentication have you got set in IIS to make ypur work?

    <?
    <?xml version="1.0" encoding="UTF-8"?>
    @namespace html url(http://www.w3.org/1999/xhtml); :root { font:small Verdana; font-weight: bold; padding: 2em; padding-left:4em; } * { display: block; padding-left: 2em; } html|style { display: none; } html|span, html|a { display: inline; padding: 0; font-weight: normal; text-decoration: none; } html|span.block { display: block; } *[html|hidden], span.block[html|hidden] { display: none; } .expand { display: block; } .expand:before { content: '+'; color: red; position: absolute; left: -1em; } .collapse { display: block; } .collapse:before { content: '-'; color: red; position: absolute; left:-1em; } <access-policy><cross-domain-access><policy><allow-from http-request-headers="*"><domain uri="*"/><domain uri="http://*"/><domain uri="file://*"/></allow-from><grant-to><resource include-subpaths="true" path="/"/></grant-to></policy></cross-domain-access></access-policy>

    Sorry, is this what u mean?
    • แก้ไขโดย xcfrt 30 มกราคม 2555 9:19
    •  
  • 30 มกราคม 2555 10:06
    ผู้ดูแล
     
     
    i got anonymous authentication on my root and on the listservice as well.
  • 30 มกราคม 2555 16:49
     
     

    Hi,

    Thanks for coming back with this, Im not sure where else to look, the reason for this thread actually is because I want to deploy the samples to an external URL, and can only get the samples working under VS web server, and not under IIS.

    It would help if I could simply deploy the sample list service example to IIS and copy the folder/configuration from here, from within VS when I try the 'Use Local IIS Web Server' and 'Create Virtiual Directory' option is says 'Unable to create the virtual direcotry. Value does not fall within the expected range'. This I cannto seem to get to work. And so have simplky cipied the wwwroot folder that works in VS and set a virtual dir in IIS manually and get security exception, which after running diag$ and getting this not found suspect it is this.

    But am lost how to debug this further at this point, any suggestions where to look further, would be greatly welcome??

    I have actually details this in a separate thread: http://social.msdn.microsoft.com/Forums/en/synclab/thread/82b1ed73-c7a2-4f78-9e0d-a597d12af52f

    BTW  I am running VS2010 on win 7 machine

  • 31 มกราคม 2555 9:48
    ผู้ดูแล
     
     คำตอบ
    can you try creating a new site in your IIS? does creating a simple ASP.Net virtual directory in your default web site in IIS work?
    • ทำเครื่องหมายเป็นคำตอบโดย xcfrt 3 กุมภาพันธ์ 2555 7:53
    •  
  • 1 กุมภาพันธ์ 2555 19:16
     
     

    Hi,

    Again thanks for getting bac on this so quikly, I realise that this is a environment issue, and thus harder to reolve.

    The clien is postponing the OCA part for now, and so will pcik this up later in the year.

     

    Thanks for your help and suggestions


    • แก้ไขโดย xcfrt 3 กุมภาพันธ์ 2555 7:53
    •  
  • 12 มีนาคม 2555 14:58
     
     

    Hi,

    I am revisting this again now, and have see that having fiddler on the response for

    GET /clientaccesspolicy.xmL IS:

    HTTP/1.1 502 Fiddler - Connection Failed

    Content-Type: text/html; charset=UTF-8

    Connection: close
    Timestamp: 14:48:38.59

    [Fiddler] The socket connection to localhost failed. <br /> No connection could be made because the target machine actively refused