Solved

How do you enable reference tracking in WCF?

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

808 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