BinaryFormatter.Serialize( Image ) - ExternalException - A generic error occurred in GDI+

后端 未结 3 1167
清酒与你
清酒与你 2021-01-14 10:35

When I try to Serialize some images using the BinaryFormatter, I\'ll get a ExternalException - A generic error occurred in GDI+.\" After scratching my head for awhi

3条回答
  •  隐瞒了意图╮
    2021-01-14 11:03

    I don't know for sure but I would lean towards different security models for XP vs Windows 7. Image inherits from System.MarshalByRefObject. There is probably proxying going on between application domains when serialization is performed. This proxying might be forbidden in Windows 7.

    http://msdn.microsoft.com/en-us/library/system.marshalbyrefobject%28v=vs.71%29.aspx

提交回复
热议问题