本文介绍了远程服务器返回错误:NOTFOUND#2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写了一个非常简单的WCF服务,即正常工作(下面的代码),然后我说了一堆的进一步方法(这是exatly相同,除了引用不同的表)。但是出于某种原因,我得到的错误远程服务器返回错误:NOTFOUND当我尝试并调用新的方法(我已经刷新了该服务引用)

I have written a very simple WCF service, that worked fine (code below), then I added a bunch of further methods (which are exatly the same, apart from the reference different tables). However for some reason, I get the error "The remote server returned an error: NotFound." when I try and call the new methods (I have refreshed the service reference)

服务引用接口

[OperationContract]
TempSchool[] GetSchools();



服务参考方法

 public TempSchool[] GetSchools()
 {
     return _db.TempSchools.ToArray();
 }



调用代码

_proxy.GetSchoolsCompleted += new EventHandler<GetSchoolsCompletedEventArgs>(_proxy_GetSchoolsCompleted);
_proxy.GetSchoolsAsync();



产生,其中发生错误

public System.Collections.ObjectModel.ObservableCollection<SilverlightTTAS6.TacticalServiceReference.ModelAction> EndGetModelActions(System.IAsyncResult result)
{
   object[] _args = new object[0];
   **System.Collections.ObjectModel.ObservableCollection<SilverlightTTAS6.TacticalServiceReference.ModelAction> _result = ((System.Collections.ObjectModel.ObservableCollection<SilverlightTTAS6.TacticalServiceReference.ModelAction>)(base.EndInvoke("GetModelActions", _args, result)));**
   return _result;
}



所以我想有一个没有被地方产生了一些配置代码.. 。任何想法?

So I guess there is some configuration code that is not being generated somewhere... any ideas?

推荐答案

关联!

我的第一个表有没有任何关联,但其他人做的,那些关联导致错误。

My first table had no associations, but the others do, and those associations are causing the errors.

然而,似乎没有在该表被加载(数据完整性)的顺序,与一个关联的任何表获得这个错误,即使它是层次结构的顶部。

However, it does not seem to be the order in which the tables are loaded (data-integrity), any table with an association gets this error, even if it is the top of the hierarchy.

这篇关于远程服务器返回错误:NOTFOUND#2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 05:42