簡體   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