asmx Web 服务中的限制
设计 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
没有。传统的 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 asBinaryFormatter
does.