asmx Web 服务中的限制

发布于 2024-08-05 06:37:48 字数 92 浏览 3 评论 0原文

设计 ASMX Web 服务时,可以使用的类型(序列化/反序列化)存在某种限制。

谁能告诉我这些限制是什么?是否可以通过在代码中添加可序列化属性来绕过它?

When designing ASMX web services, there is some sort of restriction on the types which you can use (Serialize/deserialize).

Can anyone let me know what these restrictions are? Can it be bypassed by just adding the serializable attribute to the code?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

烟─花易冷 2024-08-12 06:37:48

没有。传统的 ASMX Web 服务使用 XmlSerializer 类,并且内容是 受到该类施加的限制,其中最突出的可能是无法序列化字典。它不像 BinaryFormatter 那样关心 [Serialized] 属性。

Nope. Traditional ASMX Web services use XmlSerializer class and stuff are subject to the restrictions imposed by that class, the most prominent of which is probably not being able to serialize dictionaries. It doesn't care about the [Serializable] attribute as BinaryFormatter does.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文