本地WCF服务的何处放置ClientAccessPolicy.xml? [英] Where to place ClientAccessPolicy.xml for Local WCF Service?

查看:154
本文介绍了本地WCF服务的何处放置ClientAccessPolicy.xml?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建基本的WCF服务和Silverlight客户端.

I'm trying to create a basic WCF Service and Silverlight client.

我已遵循以下教程:由于Silverlight 4与WSHttpBinding不兼容,因此我将其更改为BasicHttpBinding.

Since Silverlight 4 was incompatible with the WSHttpBinding, I changed it to BasicHttpBinding.

不幸的是,我现在仍然收到此错误:尝试向URI'**'发出请求时发生错误.这可能是由于尝试以跨域方式访问服务而没有正确的跨域或不适合SOAP服务的策略.您可能需要联系服务的所有者,以发布跨域策略文件并确保它允许发送与SOAP相关的HTTP标头."

Unfortunately I keep getting this error now: "An error occurred while trying to make a request to URI'**'.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."

我将clientaccesspolicy.xml放在WCF项目的根目录中(与Silverlight客户端使用相同的解决方案).这不能解决问题.

I placed clientaccesspolicy.xml in the root directory of the WCF project (which is in the same solution as the Silverlight client). This did not solve the problem.

我需要做什么?

推荐答案

我认为这是重复的问题: 这是一些链接,看看它们是否对您有帮助:

I thnk this is duplicate question : here are some links , see if any of them helps u :

​​链接文本

链接文本

链接文本

这篇关于本地WCF服务的何处放置ClientAccessPolicy.xml?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆