silverlight调用java webservice 错误,跨域文件clientaccesspolicy.xml已经放入到../webapps/ROOT下,如

{System.ServiceModel.CommunicationException:尝试向URI“http://10.7.6.11:8080/CustomerWebS... {System.ServiceModel.CommunicationException: 尝试向 URI“http://10.7.6.11:8080/CustomerWebServer/services/CustomersService/”发出请求时出错。这可能是由于试图以跨域方式访问服务而又没有正确的跨域策略,或策略不适用于 SOAP 服务。您可能需要与该服务的所有者联系,以发布跨域策略文件并确保该文件允许发送 SOAP 相关的 HTTP 标头。出现此错误也可能是由于使用的是 Web 服务代理中的内部类型而没有使用 InternalsVisibleToAttribute 属性。有关详细信息,请参阅内部异常。 ---> System.Security.SecurityException ---> System.Security.SecurityException: 安全性错误。
位于 System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
位于 System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClass5.<EndGetResponse>b__4(Object sendState)
位于 System.Net.Browser.AsyncHelper.<>c__DisplayClass2.<BeginOnUI>b__0(Object sendState)
--- 内部异常堆栈跟踪的结尾 ---
位于 System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
位于 System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
位于 System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result)
--- 内部异常堆栈跟踪的结尾 ---
位于 System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)
位于 System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
位于 System.ServiceModel.ClientBase`1.ChannelBase`1.EndInvoke(String methodName, Object[] args, IAsyncResult result)
位于 ViewCustomer.Customer_Service.CustomersPortTypeClient.CustomersPortTypeClientChannel.EndgetCustomers(IAsyncResult result)
位于 ViewCustomer.Customer_Service.CustomersPortTypeClient.ViewCustomer.Customer_Service.CustomersPortType.EndgetCustomers(IAsyncResult result)
位于 ViewCustomer.Customer_Service.CustomersPortTypeClient.EndgetCustomers(IAsyncResult result)
位于 ViewCustomer.Customer_Service.CustomersPortTypeClient.OnEndgetCustomers(IAsyncResult result)
位于 System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)}
展开
 我来答
百度网友be0657f
2011-01-13 · TA获得超过479个赞
知道小有建树答主
回答量:210
采纳率:0%
帮助的人:323万
展开全部
这是跨域访问数据造成的,你肯定是让SL去访问别的服务端数据了。解决办法是必须在服务端放置跨域策略文件:
在WCF项目根目录下添加clientaccesspolicy.xml文件,内容如下:
<?xml version="1.0" encoding="utf-8" ?>
<access-policy>
<cross-domain-access>
<policy>
<allow-from http-request-headers="*">
<domain uri="*"/>
</allow-from>
<grant-to>
<resource path="/" include-subpaths="true"/>
</grant-to>
</policy>
</cross-domain-access>
</access-policy>
pjdmddr
2011-01-17
知道答主
回答量:30
采纳率:0%
帮助的人:0
展开全部
可以的,比如你有两个gridview,一个现实公司已经股票代号,从一个ws得到的,另一个显示公司的股票信息,从sina那里得到的
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式