New Posts New Posts RSS Feed: Remote server error: NotFound with POCO
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Remote server error: NotFound with POCO

 Post Reply Post Reply
Author
stevefuzzy View Drop Down
Newbie
Newbie
Avatar

Joined: 15-Jul-2011
Location: US
Posts: 3
Post Options Post Options   Quote stevefuzzy Quote  Post ReplyReply Direct Link To This Post Topic: Remote server error: NotFound with POCO
    Posted: 28-Sep-2011 at 1:48pm
That was it!

Thanks!

 
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 27-Sep-2011 at 6:50pm
I think the IGrouping is confusing the serializer. Try this instead:
    new PogSectionGroup { PogID = p.Key, Sections = p.AsEnumerable<ProjectPOG>() });
 
Also be sure to add the DataMember attribute to your PogID property.
Back to Top
stevefuzzy View Drop Down
Newbie
Newbie
Avatar

Joined: 15-Jul-2011
Location: US
Posts: 3
Post Options Post Options   Quote stevefuzzy Quote  Post ReplyReply Direct Link To This Post Posted: 26-Sep-2011 at 10:34pm
I have the following query in a Silverlight app, in a function that is called from inside of a coroutine (the caller does a yield return on the return value of the function:
	IEnumerable<PogSectionGroup> sectionGroups = null;
            var qrySections =                 em.ProjectPOGs.Where(                         p => p.ProjectID == project.ProjectID &&                              p.PogType == (int)sectionPogType)                     .OrderBy(p => p.SFFDecrementNum)                     .GroupBy(p => p.POGID)                     .Select(p => new PogSectionGroup { PogID = p.Key, Sections = p });             return qrySections.ExecuteAsync(op => sectionGroups = op.Results); The code fails when it references op.Results, with the error:
The Remote server returned an error: NotFound
PogSectionGroup is a POCO class that is compiled both in a serverside-referenced domain model, 
and client-side referenced domain model (SL dll):
    [DataContract]
    public class PogSectionGroup : IHasEntityAspectIKnownType
    {
        public enum SectionSortMetricType
        {
            VPE,
            VPEperSFF
        }
 
        [Key]
        public int PogID { getset; }
 
        [DataMember]
        public IEnumerable<ProjectPOG> Sections { getset; }
 
        private ProjectPOG _currentSection;
        private int _currentIdx;
 
        public static SectionSortMetricType SectionSortMetric(Enums.OptimizationBasis optBasis)
        {
            Debug.Assert(optBasis != Enums.OptimizationBasis.UnknownOptimization);
            return (optBasis == Enums.OptimizationBasis.IncrementVPEperSKU ||
                    optBasis == Enums.OptimizationBasis.NonIncrementVPEperSKU)
                       ? SectionSortMetricType.VPE
                       : SectionSortMetricType.VPEperSFF;
        }
 
        public bool MustKeepSection(int projectLastDelPriority, ProjectConstraint constraint)
        {
            return _currentSection.MustKeepSection(projectLastDelPriority, constraint);
        }
 
        public void Reset()
        {
            _currentIdx = 0;
            _currentSection = Sections.ElementAt(_currentIdx);
        }
 
        public ProjectPOG NextSection()
        {
            ProjectPOG nextSec = _currentSection;
            _currentSection = null;
            _currentIdx++;
            if (_currentIdx < Sections.Count()) _currentSection = Sections.ElementAt(_currentIdx);
            return nextSec;
        }
 
        [ReadOnly(true)]
        [IgnoreDataMember]
        public int BestItemDelPriority { get { return Convert.ToInt32(_currentSection.BestItemDelPrio); } }
 
        [ReadOnly(true)]
        [IgnoreDataMember]
        public double VPEperSFF { get { return _currentSection.VPEperSFF; } }
 
        [ReadOnly(true)]
        [IgnoreDataMember]
        public double VPE { get { return Convert.ToDouble(_currentSection.VPE_CUR); } }
 
        [IgnoreDataMember]
        public EntityAspect EntityAspect { getset; }      
}
 
 
I do not have a POCO service provider for this POCO class,
 but even if I add one, I still get the error
 
Any ideas?  
 
Thanks,
 
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down