New Posts New Posts RSS Feed: EntityServerException: The remote server returned an error: NotFound
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

EntityServerException: The remote server returned an error: NotFound

 Post Reply Post Reply
Author
DenisK View Drop Down
IdeaBlade
IdeaBlade


Joined: 25-Aug-2010
Posts: 715
Post Options Post Options   Quote DenisK Quote  Post ReplyReply Direct Link To This Post Topic: EntityServerException: The remote server returned an error: NotFound
    Posted: 12-Jan-2011 at 6:11pm
Hi CalvinC;

If CriterionItem is not derived from IdeaBlade.EntityModel.Entity then it must be implemented as a POCO.

Please see our Wiki for more details.

Back to Top
CalvinC View Drop Down
Newbie
Newbie
Avatar

Joined: 10-Jan-2011
Posts: 4
Post Options Post Options   Quote CalvinC Quote  Post ReplyReply Direct Link To This Post Posted: 11-Jan-2011 at 8:15am
Here's the signature:

IEntityQuery<CriterionItem> GetCriteriaQuery()

The CriterionItem isn't an IbEm.Entity.  It's simply a class defined on the Client and shared with the Server.  

Is it necessary to define this as an Entity?  I tried adding a Key attribute to no avail.

thanks for the help
Back to Top
DenisK View Drop Down
IdeaBlade
IdeaBlade


Joined: 25-Aug-2010
Posts: 715
Post Options Post Options   Quote DenisK Quote  Post ReplyReply Direct Link To This Post Posted: 10-Jan-2011 at 6:37pm
Hi CalvinC;

Could you post the GetCriteriaQuery method?

I'm assuming that the method returns an EntityQuery of type CriterionItem. How is this entity defined in the model?
Back to Top
CalvinC View Drop Down
Newbie
Newbie
Avatar

Joined: 10-Jan-2011
Posts: 4
Post Options Post Options   Quote CalvinC Quote  Post ReplyReply Direct Link To This Post Posted: 10-Jan-2011 at 10:24am

Hi, I’m brand new to DevForce and am merely checking it out at this point.

Here’s the problem I’m experiencing:

When I try to fetch data via:

IEntityQuery<CriterionItem<intstring>> entityQuery = GetCriteriaQuery();
entityQuery.ExecuteAsync((op) => { op.Results.OfType<CriterionItem<intstring>>().ToArray(); }); 

I get this error:

IdeaBlade.EntityModel.EntityServerException was unhandled
  Message=The remote server returned an error: NotFound.
  Cancelled=false
  StackTrace:
       at IdeaBlade.EntityModel.EntityQueriedEventArgs`1.get_Results()
       at IdeaBlade.EntityModel.EntityQueryOperation`1.get_Results()
  InnerException: System.ServiceModel.CommunicationException
       Message=The remote server returned an error: NotFound.
       StackTrace:
            at IdeaBlade.EntityModel.EntityServerProxy.Fetch(SessionBundle bundle, IEntityQuerySurrogate query)
            at IdeaBlade.EntityModel.EntityManager.AsyncFetchWorker(AsyncEventArgs state)
       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__DisplayClass2.<BeginOnUI>b__0(Object sendState)
                 InnerException:

 

The CriterionItem class is defined as follows and is shared with the server.

 

    public interface ICriterionItem
    {
        object Key { getset; }
        object Value { getset; }
    }
 
    public interface ICriterionItem<TKey, TValue> : ICriterionItem
    {
        new TKey Key { getset; }
        new TValue Value { getset; }
    }
 
    public partial class CriterionItem<TKey, TValue> : ICriterionItem<TKey, TValue>
    {
        public TKey Key { getset; }
        public TValue Value { getset; }
        object ICriterionItem.Key { get { return (object)Key; } set { value = (object)Key; } }
        object ICriterionItem.Value { get { return (object)Value; } set { value = (object)Value; } }
    }

 

 

DebugLog.xml doesn’t indicate any problems.  I see a couple of 504 response codes with Fiddler:

System.Xml.XmlException: The input source is not correctly formatted.
   at System.Xml.XmlExceptionHelper.ThrowXmlException(XmlDictionaryReader reader, String res, String arg1, String arg2, String arg3)
   at System.Xml.XmlExceptionHelper.ThrowXmlException(XmlDictionaryReader reader, String res, String arg1)
   at System.Xml.XmlBufferReader.ReadDictionaryKey()
   at System.Xml.XmlBinaryReader.ReadDictionaryName(StringHandle s)
   at System.Xml.XmlBinaryReader.ReadNode()
   at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
   at System.Xml.XmlDocument.Load(XmlReader reader)
   at BinaryMessageFiddlerExtension.BinaryInspector.LoadMessageIntoDocument(Byte[] encodedMessage)
   at BinaryMessageFiddlerExtension.BinaryInspector.UpdateView(Byte[] bytes)

 

Any ideas what’s going on here?  Thanks!

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down