2011-02-15 79 views
0

,如果我離開我的Silverlight應用程序10分鐘左右,然後調用一個SOAP方法我碰到下面的堆棧跟蹤:Silverlight的WCF錯誤

{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.ClientHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult) at System.Net.Browser.ClientHttpWebRequest.<>c_DisplayClass5.b_4(Object sendState) at System.Net.Browser.AsyncHelper.<>c_DisplayClass2.b_0(Object sendState) --- End of inner exception stack trace --- at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state) at System.Net.Browser.ClientHttpWebRequest.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 BlueForums.Blue.BlueClient.BlueClientChannel.EndThreadViewIncrement(IAsyncResult result) at BlueForums.Blue.BlueClient.BlueForums.Blue.IBlue.EndThreadViewIncrement(IAsyncResult result) at BlueForums.Blue.BlueClient.OnEndThreadViewIncrement(IAsyncResult result) at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)}

我試圖連接我自己的服務行爲趕上消息,並它看起來像silverlight它實際上調用服務器。

任何人有什麼想法?

+0

你有自己的ServiceHost嗎?可能是超時問題。 – decyclone 2011-02-15 15:04:17

+0

它被託管在IIS中,所以即時確認它看起來服務主機 – 2011-02-15 15:05:05

回答

0

不幸的是,由於Silverlight沙盒,你會得到一個NotFound錯誤任何錯誤發生w.r.t你的Web服務。所以,如果你想知道錯誤是什麼,你將不得不打開Web服務跟蹤。

0

我發現fiddler是的好幫手,學習如何使用它,這樣可以節省您大量的時間

0

我以前也有這個問題,似乎只能用IE瀏覽器發生。

如果服務必須超時,斷開連接,回收(IIS在服務未被訪問時會回收服務),或者只是失去連接,那麼IE將不再嘗試聯繫WCF服務,即使重新啓動服務。

最近我開始使用IE9 RC,並且這種行爲似乎已被修復。無論如何,如果silverlight應用程序曾嘗試聯繫服務器,並且由於任何原因而無法使用,那麼從該點開始的每個調用都將失敗,不僅會失敗,而且IE也不會嘗試聯繫您的服務。

因此,爲什麼在WCF中登錄不會顯示一個調用,在Firefox中,使用螢火蟲,你會看到在你10分鐘左右之後嘗試撥打電話的Silverlight應用程序。

試一試。