我在調用我的WCF服務時遇到以下錯誤。我在這裏錯過了什麼?爲什麼我得到這個WCF錯誤消息?
'System.String[]' with data contract name
'ArrayOfstring: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.
{"There was an error while trying to serialize parameter
http://tempuri.org/:myEntity. The InnerException message was
'Type 'System.String[]' with data contract name
'ArrayOfstring: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."}
您可以將代碼發佈到您的服務和/或客戶端嗎? – 2009-04-29 00:19:28
剛剛接觸到WCF ... myEntity是C#的商業對象...你可以讓我知道如何以及在哪裏向DataContractSerializer提供這種類型? – 2009-04-29 02:11:54