Problem with WCF

3 posts, 1 answers
  1. Casper
    Casper avatar
    5 posts
    Member since:
    Feb 2012

    Posted 17 Nov 2012 Link to this post

    Hi.
    I just started working with OpenAccess ORM and I have run into a weird problem.
    My application is very simple:
    Project1: Everything related to the database, including my OpenAccess-stuff.
    Project2: A WCF service to select data from project1 (this simply returns the objects created by OpenAccess).

    The problem is when I use a client to get data from the database via the WCF service, it fails with:
    "The underlying connection was closed: The connection was closed unexpectedly."
    I have however no problem returning something not related to OpenAccess, like simple strings or my own custom objects.

    //Casper
  2. Answer
    PetarP
    Admin
    PetarP avatar
    754 posts

    Posted 21 Nov 2012 Link to this post

    Hello Casper,

     That exception doesn't give out too much information on what has really gone wrong. My best guess is that you have either a self reference or a cyclic reference defined in your model and that is not supported out of the box by WCF data services. Could it be possible for you to enable the WCF debugging and share with us all the exception that occur there?

    All the best,
    Petar
    the Telerik team
    Telerik OpenAccess ORM Meets ASP.NET Web API. Read more.
  3. DevCraft banner
  4. Casper
    Casper avatar
    5 posts
    Member since:
    Feb 2012

    Posted 21 Nov 2012 Link to this post

    Hello Petar

    That gave me a more meaningful error:
    "a trace size quota was exceeded. the trace was truncated"
    I tried changing some of the settings in web.config and now it works. I did get a bit lost in all the settings so I can't remember exactly what i did, but it works :)

    Thanks

    //Casper
Back to Top