Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to binary serialize a class in a Portable Class Library?

I'm using a Portable Class Library in my asp.net application and when deploying to Azure my session state needs to be serialized. Classes from this PCL don't have the SerializableAttribute sinds that's not available in the framework subset. Can't I put these classes in the ASP.NET session?

like image 961
rboeije Avatar asked Feb 18 '13 13:02

rboeije


1 Answers

Well, you can use one of the available 3rd party serializers that are available for the Portable Class Library:

  • protobuf-net - binary
  • Json.NET

Both are available on NuGet

like image 80
Sebastian Avatar answered Nov 04 '22 10:11

Sebastian