I am trying to implement the IIdGenerator using the NumericIdGenerator sample I found here:
When I run my Silverlight app. after that I get this exception as a result of calling InvokeServerMethodAsync() that has nothing to do with generating IDs (but is called short after the connect/login process):
Repository persistence operation failed; The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter
http://ideablade.com/EntityModel:InvokeServerMethodResult. The InnerException message was
'Element 'http://ideablade.com/EntityModel:NextIdGenerator' contains data of the 'http://schemas.datacontract.org/2004/07/ServerModelC2Net:C2NetIdGenerator' data contract. The deserializer has no knowledge of any type that maps to this contract. Add the type corresponding to 'C2NetIdGenerator' to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding it to the list of known types passed to DataContractSerializer.'. Please see InnerException for more details.
The only changes of importance I did to NumericIdGenerator was that I changed the namespace and it's name to C2NetIdGenerator and let IsApplicable() allways return true.
Any Idea what is the solution to this?