在Silverlight应用程序中使用WCF服务的问题 [英] Problem in using wcf service in silverlight application

查看:115
本文介绍了在Silverlight应用程序中使用WCF服务的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有必须使用WCF服务的silverlight 5应用程序.
当调用服务方法之一时,出现此错误


尝试向URI"http://localhost:1574/Service1.svc"发出请求时发生错误.这可能是由于尝试在没有适当的跨域策略或不适合SOAP服务的策略的情况下尝试以跨域方式访问服务.您可能需要联系服务的所有者以发布跨域策略文件,并确保它允许发送与SOAP相关的HTTP标头.此错误也可能是由于在Web服务代理中使用内部类型而不使用InternalsVisibleToAttribute属性而引起的.有关更多详细信息,请参见内部异常.


我该如何解决这个问题.
谢谢.

Hi
I have silverlight 5 application that it must use WCF service.
when a call one of methods of service I got this error


An error occurred while trying to make a request to URI ''http://localhost:1574/Service1.svc''. 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.


How can I solve this problem.
Thanks.

推荐答案

如果您甚至花5分钟时间尝试使用Google,都将找到解决问题的答案!!!我所做的只是google:wcf中的跨域部署

为什么你们这些人必须这么懒惰?

此处 [
If you took even 5 minutes to try using Google you would find the answer to your problem!!! All I did was google: cross domain deployment in wcf

Why must you people be so damn lazy?

here[^]is the article that will provide you the answer.


这篇关于在Silverlight应用程序中使用WCF服务的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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