我有一个所有调用都可以运行的WCF。所有这些都是银光。但是这个人称它无法找到它,但它存在并且它也显示出银光的一面。我被困4小时。有什么想法吗?
这有效:
_client.GetHandSetsCompleted += new EventHandler<GetHandSetsCompletedEventArgs>(_client_GetHandSetsCompleted);
_client.GetMarketsCompleted += new EventHandler<GetMarketsCompletedEventArgs>(_client_GetMarketsCompleted);
_client.GetCountByKeyCompleted += new EventHandler<GetCountByKeyCompletedEventArgs>(_client_GetCountByKeyCompleted);
_client.GetHandSetsAsync();
_client.GetMarketsAsync();
但是一碰到这个:
private void UsrExchangeExportClicked(object sender, ExchangeQuerySetArg e)
{
XchangeQuerySet x = new XchangeQuerySet();
x.End = e.End;
x.Start = e.Start;
x.Handset = e.Handset;
//x.Markets = new ObservableCollection<int>(e.Markets);
_client.GetCountByKeyAsync(x);
}
它抛出错误。毫无意义。
System.ServiceModel.CommunicationException was unhandled by user code
Message=The remote server returned an error: NotFound.
StackTrace:
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 ExWarranty.XchangeRef.XchangeServiceClient.XchangeServiceClientChannel.EndGetCountByKey(IAsyncResult result)
at ExWarranty.XchangeRef.XchangeServiceClient.ExWarranty.XchangeRef.IXchangeService.EndGetCountByKey(IAsyncResult result)
at ExWarranty.XchangeRef.XchangeServiceClient.OnEndGetCountByKey(IAsyncResult result)
at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)
InnerException: System.Net.WebException
Message=The remote server returned an error: NotFound.
StackTrace:
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)
InnerException: System.Net.WebException
Message=The remote server returned an error: NotFound.
StackTrace:
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__1(Object sendState)
InnerException: