Silverlight 4尝试访问托管WCF应用程序的Windows服务时的跨域异常 [英] Cross Domain Exception when Silverlight 4 tries to Access Windows service hosting WCF Application

查看:75
本文介绍了Silverlight 4尝试访问托管WCF应用程序的Windows服务时的跨域异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试通过silverlight 4访问Windows服务时,我通过Windows服务托管了我的WCF服务,我得到以下例外

I'm have hosted my WCF service through a windows service when i try to access the windows services through silverlight 4 ,i get the below exception as

"An尝试向URI"http:// hschshosdb39949:9090 / ExcelService / endpoint"发出请求时发生错误。


这可能是因为在没有适当的跨域策略的情况下尝试以跨域方式访问服务,


或者不适合SOAP服务的策略。您可能需要联系服务所有者以发布跨域策略文件


并确保它允许发送与SOAP相关的HTTP标头。在不使用InternalsVisibleToAttribute属性的情况下,在Web服务代理中使用内部


类型也可能导致此错误。有关详细信息,请参阅内部异常。"

"An error occurred while trying to make a request to URI 'http://hschshosdb39949:9090/ExcelService/endpoint'.
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."

应将文件crossdomainpolicy.xml和clientaccesspolicy.xml置于何处以解决此异常

where should the files crossdomainpolicy.xml and clientaccesspolicy.xml be placed to solve this exception

开发环境(.NET4,VS2010,Silverlight4,Windows Server 2008 R2)

dev environment (.NET4,VS2010,Silverlight4,Windows server 2008 R2)

 

 

推荐答案

Hi Silpa,

Hi Silpa,

我们正在研究这个问题,可能需要一段时间反馈给你。

We are doing on research on this issue, it may take some time to feed back to you.

感谢您的理解。


这篇关于Silverlight 4尝试访问托管WCF应用程序的Windows服务时的跨域异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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