2012-04-05 77 views
0

对不起,如果标题有点模糊,但事实是我不明白我的问题,我从来没有遇到过这个,我没有做任何事情的普通。与我的WCF服务SL4应用程序通信异常

右键我有一个使用业务应用程序模板的基本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)} 

我有一个CLIENTACCESS政策,这对于测试的目的设置为允许任何访问跨域策略,

Client Access Policy

Cross Domain

关于如何解决这个问题的任何想法,我调试了我的WCF服务,它接收到调用,执行的方法达到了它的返回语句,但是我的SL4从来没有收到结果,只要我的WCF服务有结果我得到了一个在我的SL4应用程序中抛出的异常,对我来说,似乎只是连接关闭了,但我不知道,我试图研究,但是你从哪里开始并没有完全理解?我发现很多人都有同样的错误信息,但是WCF太神秘了......我尝试并启用了我的webconfig中的调试信息。我也曾尝试举办我的Web服务器,但没有运气的WCF服务,我必须对运行几个WCF服务的一组类似,所以我不能确定为什么这心不是工作

Web Config for WCF Service

client config

感谢在看看,如果你需要任何更多的信息只是问我会很乐意为您提供它,

+0

原来,这个问题是通过追踪解决的,为我自己学到了一些新的东西,所以在将来我不会再遇到这个问题! – 2012-04-05 23:17:36

回答

1

最好的办法是打开WCF跟踪,所以你可以看到正在发生的事情。

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

最可能的原因是序列化的东西的问题。未找到仅仅是500错误的Silverlight版本。

+0

感谢科比,我将看看, – 2012-04-05 22:54:15

+0

感谢科比问题出在我的DataContext被处置,但在后期访问,仍然试图解决,但幸运的是,我知道在哪里寻找答案 – 2012-04-05 23:07:42

+1

这是一个有趣的一。 :) – Bryant 2012-04-05 23:09:19

相关问题