繁体   English   中英

我的 WCF 服务 SL4 应用程序出现通信异常

[英]Communication Exception with my WCF Service SL4 app

对不起,如果标题有点含糊,但事实是我不明白我的问题,我以前从未遇到过这个,我也没有做过任何不寻常的事情。

对 我有一个基本的 Silverlight 4 使用业务应用程序模板的应用程序。 我还创建了一个 WCF 服务应用程序项目,用于简单地为我的数据库中的某些条目返回一个 Observable 集合,

我将其发布到我的本地计算机,然后在我的 SL4 应用程序中引用它,我得到了这个异常

[System.ServiceModel.CommunicationException: The remote server returned an error:     NotFound. ---> System.Net.WebException: The remote server returned an error: NotFound. --->     System.Net.WebException: The remote server returned an error: NotFound.
at System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult  asyncResult)
at System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClass5.  <EndGetResponse>b__4(Object sendState)
at System.Net.Browser.AsyncHelper.<>c__DisplayClass4.<BeginOnUI>b__0(Object sendState)
--- End of inner exception stack trace ---
at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object  state)
at System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at  System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.  CompleteGetResponse(IAsyncResult result)
--- End of inner exception stack trace ---
at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)
at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs,  IAsyncResult result)
at System.ServiceModel.ClientBase`1.ChannelBase`1.EndInvoke(String methodName, Object[]  args, IAsyncResult result)
at  RMServiceRIA.rService.Service1Client.Service1ClientChannel.EndgetBuildings(IAsyncResult  result)
at  RMServiceRIA.rService.Service1Client.RMServiceRIA.rService.IService1.EndgetBuildings(IAsync Result result)
at RMServiceRIA.rService.Service1Client.OnEndgetBuildings(IAsyncResult result)
at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)}

我有一个客户端访问策略和跨域策略,出于测试目的设置为允许任何访问,

客户端访问策略

跨域

关于如何解决这个问题的任何想法,我调试了我的 WCF 服务并且它接收到调用,执行的方法到达它的返回语句,但是我的 SL4 甚至从未收到结果,一旦我的 WCF 服务有结果我得到一个异常扔在我的 SL4 应用程序中,对我来说似乎连接已关闭但我不知道并且我已经尝试研究但是你从哪里开始你不完全理解的东西? 我发现很多人都有同样的错误消息,但是 WCF 太他妈神秘了……我确实尝试在我的 webconfig 中启用调试信息。 我还尝试在我的 Web 服务器上托管 WCF 服务,但没有运气,我有几个 WCF 服务在其上运行,设置类似,所以我不确定为什么这不起作用

Web 配置 WCF 服务

客户端配置

感谢您的浏览,如果您需要更多信息,请询问我很乐意为您提供,

最好的办法是打开 WCF 跟踪,这样您就可以看到发生了什么。

http://software.intel.com/en-us/blogs/2010/02/03/adventures-with-silverlight-and-wcf-the-remote-server-returned-an-error-notfound/

序列化某些东西很可能存在问题。 未找到只是 Silverlight 版本的 500 错误。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM