开发者

Solving cross-domain error when calling webservice from Silverlight hosted within Sharepoint

I've got a website that contains a webservice and a clientaccesspolicy.xml file that looks like this:

<?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 include-subpaths="开发者_JS百科true" path="/"/>
      </grant-to>
    </policy>
  </cross-domain-access>
</access-policy>

When I try to access this webservice from a Silverlight application that's run from my computer or from the webapplication it works just fine. When I drop the silverlight xap into Sharepoint and run it there, it creates a cross-domain error. Shouldn't this clientaccesspolicy file give any computer access ? Am I missing some extra parameters? The clientaccesspolicyfile does infact work somewhat, because I was unable to access the webservice from my computer before that was added.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜