To dynamically expose an RSS/Atom endpoint for a service that has an unknown enumerable type. The type will be found via reflection to build the syndication endpoint(s).
I am using .net 4.0 I am reflecting over a dll to expose endpoints, ie json, xml, soap. That all works as I want it to. (I am thus, using code to configure my WCF setup). I am now trying to expose an rss endpoint for all ICollection found via reflection
exposed via my services so that I can expose a SyndicationFeed for each method returning an ICollection. I believe that I want to use a datascontractsurrogate, and have followed what msdn has to add on this. I have hooked up my datacontractsurrogate and I
have observed that it is hitting my debug points inside of the surrogate. I am getting the following exception from the svclog viewer:
System.Runtime.Serialization.InvalidDataContractException, System.Runtime.Serialization, Version=18.104.22.168, Culture=neutral, PublicKeyToken=b77a5c561934e089
Using surrogates with get-only collection properties is not supported. Consider removing the surrogate associated with 'System.Collections.Generic.Dictionary`2[[System.Xml.XmlQualifiedName, System.Xml, Version=22.214.171.124, Culture=neutral, PublicKeyToken=b77a5c561934e089],
View Complete Post