title: Silverlight - ClientAccessPolicy.xml Syntax
body: <p>I'm trying to communicate with an Apache web server in a cross-domain way.</p>
  
  <p>I have a clientaccesspolicy.xml file set up on the root of the domain and it is successfully retrieved by the Silverlight client when attempting to make a GET request to a Java servlet that's been set up.</p>
  
  <p>The specifics are something like this:</p>
  
  <p>URL to access: dev.corp.companyname.com/servlets/targetServlet</p>
  
  <p>The clientaccesspolicy.xml file looks like this:</p>
  
  <pre><code>&lt;access-policy&gt; 
    &lt;cross-domain-access&gt; 
      &lt;policy&gt; 
        &lt;allow-from http-request-headers ="*"&gt; 
          &lt;domain uri ="http://*" /&gt; 
        &lt;/allow-from &gt; 
        &lt;grant-to &gt; 
          &lt;resource path ="servlets/targetServlet" include-subpaths ="false"/&gt; 
        &lt;/grant-to&gt; 
      &lt;/policy &gt; 
    &lt;/cross-domain-access&gt; 
  &lt;/access-policy&gt; 
  </code></pre>
  
  <p>I'm getting the common SecurityException with "Security Error" as it's message. I assume this means that the clientaccesspolicy.xml file is set up correctly.</p>
  
  <p>So here are the questions:
  Should </p>
  
  <pre><code>&lt;domain uri ="http://*" /&gt;
  </code></pre>
  
  <p>be</p>
  
  <pre><code>&lt;domain uri ="*" /&gt;
  </code></pre>
  
  <p>Also. Should</p>
  
  <pre><code>&lt;resource path ="servlets/targetServlet" include-subpaths ="false"/&gt; 
  </code></pre>
  
  <p>be</p>
  
  <pre><code>&lt;resource path ="/servlets/targetServlet" include-subpaths ="false"/&gt;
  </code></pre>