NetDataContractSerialization throwing deserialization error

Posted by htanias on Stack Overflow See other posts from Stack Overflow or by htanias
Published on 2010-03-20T16:28:17Z Indexed on 2010/03/20 16:31 UTC
Read the original article Hit count: 387

Filed under:
|
|

hi,

I have methods which return interface and some methods which accepts interface as parameters. I am trying to use Net DataContractSerializer but I am getting following error...

The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:id. The InnerException message was 'Error in line 1 position 120. XML 'Element' 'http://tempuri.org/:id' does not contain expected attribute 'http://schemas.microsoft.com/2003/10/Serialization/:Type'. The deserializer has no knowledge of which type to deserialize. Check that the type being serialized has the same contract as the type being deserialized.'. Please see InnerException for more details.

Please help me how to resolve this error.... If I use Netdatacontract attribute on Operation Contract, can i use DataContract and Datamember attribute on serializable class???

Thanks in advance...

© Stack Overflow or respective owner

Related posts about wcf

Related posts about wcfservice