Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3282632
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:56:58+00:00 2026-05-17T19:56:58+00:00

I have a database with a lots of relationships between Tables and a Silverlight

  • 0

I have a database with a lots of relationships between Tables and a Silverlight client that connects to my server with WCF service on ASP.Net side.

First i used LINQ to SQL as a robust mapper tables to object and in a WebMethod that returns a List<Foo> of my Database’s object(suppose GetFoo()). The Foo has lots of relationships with other objects that each of that have lots of realaships too,(this means , there is a PK and FK between tables).also i use Microsoft Service Trace Viewr for track my service

When i call GetFoo() , WCF returns this error:

Object graph for type ‘X.Y.Z’ contains cycles and cannot be serialized if
reference tracking is disabled

I searched this error and find this great post but that is not working properly and i see same error too.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T19:56:59+00:00Added an answer on May 17, 2026 at 7:56 pm

    Various options:

    • remove the cyclic dependencies from your model; this might be tricky for a generated model that has lots of existing code built against it, but is worth a try; however, you typically want to not serialize the parent, which is exactly what LINQ-to-SQL wants you to keep (it’ll let you drop the children property, but that is what you usually want to serialize)
    • enable cyclic references; it looks like you’ve tried this without success; did you enable it at both ends, though? Actually I wouldn’t be surprised if Silverlight doesn’t like this extension (it has limited extension support)
    • use a separate (flat) DTO model for data transfer purposes
    • try using NetDataContractSerializer; I can’t remember if this is supported in Silverlight, and I must admit I’m not its biggest fan, but it might be a pragmatic fix here

    I’d vote firmly in the “DTO model” category; simply, having a separate model means you are less likely to run into tangles whenever you tweak the DB – and you are in complete control over it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have database with multiple tables in Microsoft SQL Server with schema in tables
I have an asp.net application that runs on a custom app pool which runs
I have a huge database that has lots and lots of poorly documented constraints.
I have a SQL Server database with lots of data and an empty MySQL
I have a database that has lots of data and is all neat, normalized
I have the following table in a SQL Server 2008 database with lots of
I have a database object (a row), that has lots of properties (columns) that
Suppose the following scenario: I have a master database that contains lots of data,
I have a database with lots of game objects, which is being queried by
I want to create a 'mini-database'. I want to have one file with lots

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.