问题描述:

I'm porting my framework code from .NET 4.0 to 4.5 using portable class libraries. One thing I run into is that the SerializableAttribute is missing, which I used to enable binary serialization to store objects in the asp.net session state. I've seen people suggesting using DataContract as alternative but that won't help for the BinaryFormatter.

Basically I have 2 scenario's:

  • I'd like to store objects in the session state (out-of-process)

  • I'd like to be able to serialize them as well to JSON of XML to send them over the wire

What would be a good solution which enables me both?

相关阅读:
Top