securityexception - Silverlight - ClientAccessPolicy.xml Syntax -


i'm trying communicate apache web server in cross-domain way.

i have clientaccesspolicy.xml file set on root of domain , retrieved silverlight client when attempting make request java servlet that's been set up.

the specifics this:

url access: dev.corp.companyname.com/servlets/targetservlet

the clientaccesspolicy.xml file looks this:

<access-policy>    <cross-domain-access>      <policy>        <allow-from http-request-headers ="*">          <domain uri ="http://*" />        </allow-from >        <grant-to >          <resource path ="servlets/targetservlet" include-subpaths ="false"/>        </grant-to>      </policy >    </cross-domain-access>  </access-policy>  

i'm getting common securityexception "security error" it's message. assume means clientaccesspolicy.xml file set correctly.

so here questions: should

<domain uri ="http://*" /> 

be

<domain uri ="*" /> 

also. should

<resource path ="servlets/targetservlet" include-subpaths ="false"/>  

be

<resource path ="/servlets/targetservlet" include-subpaths ="false"/> 

you should use <domain uri ="*" /> if want enable http , https callers. <domain uri ="http://*" /> enable http callers.

use <resource path ="/servlets/targetservlet" include-subpaths ="false"/> define path root of site no access sub directories. use specific , not releative. network security access restrictions in silverlight

the attribute uri relative root of domain. refers specific path can represent web service or file.

the path cannot contain wildcard characters or characters not recognized uniform resource identifier (uri): generic syntax, http://ietf.org/rfc/rfc3986

this element , attribute used solely requests webclient , http classes.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -