2011-02-15 67 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应用程序。

试一试。