Solved

How do you enable reference tracking in WCF?

Posted on 2008-10-17
3
2,891 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
  • 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

While working on Silverlight and WCF application, I faced one issue where fault exception occurred at WCF operation contract is not getting propagated to Silverlight client. So after searching net I came to know that it was behavior by default for s…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

705 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now