Tuesday, November 15, 2011

KnownTypeAttribute & ServiceKnownTypeAttribute...

Recently I was debugging a problem with below error:

There was an error while trying to serialize parameter http://tempuri.org/:GetProcessResult. The InnerException message was 'Type BusinessObject2' with data contract name 'BusinessObject2:' is not expected. Add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to DataContractSerializer.'.  Please see InnerException for more details.

I found the detailed explanation of what actually I am missing here from following links:

It solved my issue of inheritance DTO issue in SOA world!

#trivedimehulk@gmail.com