Solved

How do you enable reference tracking in WCF?

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Here I am going to explain creating proxies at runtime for WCF Service. So basically we use to generate proxies using Add Service Reference and then giving the Url of the WCF service then generate proxy files at client side. Ok, what if something ge…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

863 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

26 Experts available now in Live!

Get 1:1 Help Now