DataContract 序列化抛出安全异常
我正在尝试在 WPF 和 WP7 上使用 DataContractSerialization。在 WPF 上一切都很好,但在 WP7 上却不然。当我尝试在 wp7 上序列化对象时,收到未知的安全异常。请查看随附的源代码并帮助我。
谢谢。
I am trying to use DataContractSerialization on WPF and WP7. All things are good on WPF but not on WP7. When I tryed to serialize an object on wp7, I received an unknown security exception. Please view the attached source code and help me.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我有同样的问题。
在我的场景中,我试图序列化一个嵌套类。
我必须删除嵌套并将该类定义为公共类,然后它就起作用了。
I had the same issue.
In my scenario, I was trying to serialize a nested class.
I had to remove the nesting and define the class as public, and then it worked.