2011-07-07 14 views
1

私はC#アプリケーションでAppFabricキャッシングを使用しています。私は常にXmlDocumentをキャッシュしようとしたが、次のエラーを取得しています:'System.Xml.XmlDocument'をシリアル化できません。

Type 'System.Xml.XmlDocument' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute.

どのように私はこの問題を解決することができますか?

+2

シリアル化されたXmlDocumentクラスではなく、XMLを文字列として保存するだけではどうですか。 – mdm

+0

可能な複製[C#:wcfはXmlDocumentを返す?](http://stackoverflow.com/questions/964870/c-wcf-return-an-xmldocument) –

答えて

-1

同じ問題があり、XML文書を含むプロパティ/フィールドを非シリアル化としてマークして解決しました。

関連する問題