gpt4 book ai didi

c# - WCF 序列化错误 - 'System.Net.Mail.MailAddress' 无法序列化

转载 作者:太空宇宙 更新时间:2023-11-03 11:46:29 24 4
gpt4 key购买 nike

请帮我解决这个 WCF 错误....我该如何处理 WCF 的这些内置类?

Type 'System.Net.Mail.MailAddress' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. See the Microsoft .NET Framework documentation for other supported types.

最佳答案

你可以实现一个 surrogate知道如何反(序列化)MailAddress 类型。

关于c# - WCF 序列化错误 - 'System.Net.Mail.MailAddress' 无法序列化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3296852/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com