ISerializable on value types
From: Eran Kampf (tentacle_at_zahav.net.il)
Date: 09/22/04
- Next message: richlm: "Re: Forms Authentication"
- Previous message: Hervey Wilson [MSFT]: "Re: SignedXml.CheckSignature(); CryptographicException: Unknown tranform has been encountered"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 22 Sep 2004 19:47:24 +0200
I noticed this wierd problem when implementing ISerializable for a value
type.
The MSDN documentation (and FxCop) say The GetObjectData method should be
marked with [SecurityPermissionAttribute(SecurityAction.Demand,
SerializationFormatter=true)]
(http://www.gotdotnet.com/team/fxcop/docs/rules/SecurityRules/GetObjectData.html).
When I mark my value type's GetMethodData method with the above CAS
deleration I get a wierd SEHException during serialization.
Without the above CAS decleration, serialization\deserialization runs
fine...
Reference types on the other hand work fine with the above CAS
decleration...
Any idea why this is happening?
Eran Kampf
http://www.ekampf.com
- Next message: richlm: "Re: Forms Authentication"
- Previous message: Hervey Wilson [MSFT]: "Re: SignedXml.CheckSignature(); CryptographicException: Unknown tranform has been encountered"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|