Silverlight clientaccesspolicy.xml

时间:2014-09-01 08:24:27

标签: silverlight sharepoint-2013

我们拥有带有RIA网络服务的Silverlight应用程序。网址:https://mysite.mydomain.com/services/mysitewebservice.svc

此外,我们在单独的域中托管了Sharepoint(SharePoint 2013)网站。网址:https://mysharepointsite.mydomain.com

Silverlight RIA服务在SharePoint Silverlight Web部件中调用。 我将“clientaccesspolicy.xml”文件放在Silverlight根站点(URL:https://mysite.mydomain.com/clientaccesspolicy.xml)中,我可以在IE v11浏览器中查看此文件。兼容性视图已打开。

<?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 path="/" include-subpaths="true"/>
  </grant-to>
</policy>

但是在SharePoint Site SL Web部件中调用该服务。仍然会发生异常错误。

"Load operation failed for query 'GetMyData'. An error occurred while trying to make a request to URI 'https://mysite.mydomain.com/services/mysitewebservice.svc/binary/GetMyData?category=sales'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details."

我阅读了很多论坛和文章,但他们都指出将clientaccesspolicy.xml放在根网站上。

缺少什么。请帮忙。

0 个答案:

没有答案