This is a migrated thread and some comments may be shown as answers.
Type 'Telerik.OpenAccess.OpenAccessContext' cannot be serialized
2 Answers 37 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Paul
Top achievements
Rank 1
Paul asked on 02 Apr 2012, 06:18 PM
Hi, I have a OpenAccessDomain Model and OpenAccessDomainService for WCF Ria which works fine in my silverlight app. I wanted to try out the new kendo web stuff and first thought I could just enable the odata endpoint for my Ria Service which worked as an odata, but discovered this is no good for kendo as that puts parameters on the url and wcf ria does not support this. So I thought I would enable the json endpoint but when this is enabled I get the following error and it even stops my silverlight app from working as that gives this error too.

Type 'Telerik.OpenAccess.OpenAccessContext' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. If the type is a collection, consider marking it with the CollectionDataContractAttribute. See the Microsoft .NET Framework documentation for other supported types.

As soon as i remove the json endpoint my silverlight app starts working again. So how can I expose my OpenAccess WCF RIA service via json without getting this error.

Thanks

2 Answers, 1 is accepted

Sort by
0
Paul
Top achievements
Rank 1
answered on 03 Apr 2012, 11:28 AM
My bad I had a rouge function that was causing this. Removed it and all is now good.
0
PetarP
Telerik team
answered on 05 Apr 2012, 03:18 PM
Hello Paul,

 We are happy that you have managed to resolve the problem yourself. Please do not hesitate to contact us back should you have any further problems.

Greetings,
Petar
the Telerik team
Telerik OpenAccess ORM Q1 2012 release is here! Check out what's new or download a free trial >>
Tags
General Discussions
Asked by
Paul
Top achievements
Rank 1
Answers by
Paul
Top achievements
Rank 1
PetarP
Telerik team
Share this question
or