开发者

The remote server returned an error: NotFound #2

开发者 https://www.devze.com 2022-12-23 00:42 出处:网络
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

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)

Service Reference Interface

[OperationContract]
TempSchool[] GetSchools();

Service Reference Method

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

Calling code

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

generated code where error occurs

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 = 开发者_如何学Go((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?


Associations!

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消