This question is locked. New answers and comments are not allowed.
I am getting a cryptic error with some simple functions in my WCF service. I have 2 functions that just get some persistent objects in a List. One of them works fine. The other (which has a many-to-many relationship) throws the following error when I try to invoke it using the WCF Test Client:
Failed to invoke the service. Possible causes: The service is offline or inaccessible; the client-side configuration does not match the proxy; the existing proxy is invalid. Refer to the stack trace for more detail. You can try to recover by starting a new proxy, restoring to default configuration, or refreshing the service.
This does not say alot and has nothing to do with refreshing, etc. Based on an issue with EntityFramework I found, I am led to believe that this is lazy loading related (remember that the function that does not work has m-to-m relationships). Perhaps an issue serializing collections?
I have tested this with several other functions. All of the ones with m-to-m relationships throw the error and ones without, work fine. Anyone ever see this error?
My WCF service implemenation
Helper biz object for Speaker
Speaker persistent object (notice the ILists at the bottom)
Failed to invoke the service. Possible causes: The service is offline or inaccessible; the client-side configuration does not match the proxy; the existing proxy is invalid. Refer to the stack trace for more detail. You can try to recover by starting a new proxy, restoring to default configuration, or refreshing the service.
This does not say alot and has nothing to do with refreshing, etc. Based on an issue with EntityFramework I found, I am led to believe that this is lazy loading related (remember that the function that does not work has m-to-m relationships). Perhaps an issue serializing collections?
I have tested this with several other functions. All of the ones with m-to-m relationships throw the error and ones without, work fine. Anyone ever see this error?
My WCF service implemenation
namespace IntegrationServices{ public class EventService : IServiceApi { public List<Event> GetAllEvents() { return new EventHelper().GetAllEvents(); } public List<Speaker> GetAllSpeakers() { return new SpeakerHelper().GetAllSpeakers(); } }}Helper biz object for Speaker
public class SpeakerHelper : BusinessServicesBase
{ public List<Speaker> GetAllSpeakers() { var returnedSpeakers = from x in ObjectScope.Extent<Speaker>() select x; return returnedSpeakers.ToList(); }}Speaker persistent object (notice the ILists at the bottom)
[Telerik.OpenAccess.Persistent(IdentityField="speakerId")] public class Speaker { private int speakerId; // pk private string bioHTML; private string emailAddress; private int eventId; private string firstName; private string lastName; private IList<Document> document = new List<Document>(); // inverse Document.speaker private IList<Session> session = new List<Session>(); // inverse Session.speaker public Speaker() { }
...}