WCF在Silverlight中出现跨域问题 [英] cross domain issue in Silverlight with wcf

查看:116
本文介绍了WCF在Silverlight中出现跨域问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

实际上,我正在使用Silverlight应用程序,并使用wcf来使用Web服务.

Silverlight应用程序中面临的跨域问题

Actually I am using silverlight application and consuming webservice using wcf.

Facing cross domain issue in the silverlight application

错误:

System.Servicemodel.CommunicationException:[CrossDomain]

System.Servicemodel.CommunicationException:[CrossDomain]

我对此问题进行了很多搜索,我做了他们提到的方法,但是对我没有任何帮助.

我尝试在根目录中添加 Crossdomain.xml ,甚至在根目录中添加 clientaccesspolicy.xml .

但是对我没有任何帮助.
我还有其他方法可以解决此问题吗?

所以请尽快帮我.
在此先谢谢您.

I googled a lot regarding the issue, i did the way they mentioned but nothing works for me.

I tried adding Crossdomain.xml in root directory, even added clientaccesspolicy.xml in root directory.

But nothing works for me.
Is there any other way that i can work on to get resolved this issue?

So please help me ASAP.
Thanks in advance.

推荐答案

您尝试了 ^ ]?

这是一个很普遍的问题:
http://forums.silverlight.net/t/67502.aspx/1 [ ^ ]

然后编辑xml文件:
http://msdn.microsoft.com/en-us/library/cc197955%28v = vs.95%29.aspx [ ^ ]
Did you try Google[^]?

Its quite a common problem:
http://forums.silverlight.net/t/67502.aspx/1[^]

And editiong the xml files:
http://msdn.microsoft.com/en-us/library/cc197955%28v=vs.95%29.aspx[^]


将我的服务链接更改为本地服务器路径,

我的意思是,将服务器路径映射到我的服务,这也将服务检索到我的应用程序中.
Changed my service link to my local server path,

i mean, mapped the server path to my service which retrieves the service into my application as well.


这篇关于WCF在Silverlight中出现跨域问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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