gpt4 book ai didi

silverlight - 带有 WCF 的 Silverlight 中的跨域策略错误

转载 作者:行者123 更新时间:2023-12-02 07:13:26 24 4
gpt4 key购买 nike

将我的 Silverlight 应用程序连接到我的 WCF 服务时出现以下错误。我将此 wcf 托管为自托管服务。

An error occurred while trying to make a request to URI 'http://lmr-hero/iSponsorWebSite/projectService.svc/basic'. 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.

此错误的可能原因是什么?

最佳答案

如果您的 Silverlight 应用程序未托管在与服务相同的域中,那么您需要将 clientaccesspolicy.xml 或 crossdomain.xml 文件放在托管服务的服务器上。

有关详细信息,请参阅此链接:http://msdn.microsoft.com/en-us/library/cc197955%28VS.95%29.aspx

关于silverlight - 带有 WCF 的 Silverlight 中的跨域策略错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3449797/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com