I'm pretty new to WCF , as an experiment I was trying to create a WCF service wrapper over an exception handler class which is using the enterprise library underneath.
I created a simple class with one exception variable, which gets exposed as the data contract
when I try to pass the exception to the WCF service I get the following serialzation error
There was an error while trying to serialize parameter http://tempuri.org/:ex. The InnerException message was 'Type 'System.Collections.ListDictionaryInternal' with data contract name 'ArrayOfKeyValueOfanyTypeanyType:http://schemas.microsoft.com/2003/10/Serialization/Arrays' 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 configured the app.config for the calling application by adding Syste.Exception as known type in the DataContractSerializer
ÃÂ ÃÂ ÃÂ <dataContractSerializer>
ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ <declaredTypes>
ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ <add type="System.Exception, mscorlib, Version=188.8.131.52, Culture=neutral, PublicKeyToken=b77a5c561934e089">
ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ <knownType type="System.Exception, mscorlib, Version=184.108.40.206, Cult
View Complete Post