Solved

How do you enable reference tracking in WCF?

Posted on 2008-10-17
3
2,914 Views
Last Modified: 2012-05-05
I'm getting a strange error from a WCF service. The service returns a CampaignEmailDTO object, which has a 1 to many relationship with CampaignEmailRuleDTO. How do I fix this error?

The error is:

Object graph for type 'xx.xx.CampaignEmailRuleDTO' contains cycles and cannot be serialized if reference tracking is disabled.




The classes are:

[Serializable]
Class CampaignEmailDTO {
        public int Id {...}
        public string Name {...}
        public string FromAddress {...}
        ......etc.....
}

[Serializable]
Class CampaignEmailRuleDTO {
        public CampaignEmailDTO() {...}
        public int Id {...}
        public string Name {...}
        public List<CampaignEmailRuleDTO> CampaignEmailRules {...}
        public List<CampaignEmailSendLogDTO> CampaignEmailSendLogs {...}
        ......etc.....
}
0
Comment
Question by:craigdev
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 16

Expert Comment

by:CuteBug
ID: 22739041
0
 
LVL 1

Author Comment

by:craigdev
ID: 22739098
Thanks, but I'm sort of hoping there is a simpler way.
0
 
LVL 16

Accepted Solution

by:
CuteBug earned 500 total points
ID: 22739966
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question