Hi,
I want use memcache in a site. to use it I need to serialize objects.
I serialized domain objects, but I have this error now:
Enyim.Caching.MemcachedClient - System.Runtime.Serialization.SerializationException: The type 'Devart.Data.Linq.a' in assembly 'Devart.Data.Linq, Version=2.50.29.0, Culture=neutral, PublicKeyToken=09af7300eec23701' is not marked as serializable.
With this object I can't serialize my objects.
How can I make internal types of devart serializable?
thanks to all
Serialize objects for use with memcache
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
According to the stack trace, Enyim.Caching.MemcachedClient uses BinaryFormatter to serialize objects. LinqConnect entities are not designed to be serialized via BinaryFormatter, DataContractSerializer should be used instead. For more information about this way of serialization, please refer to the following article:
http://msdn.microsoft.com/en-us/library ... aspx#Y1680
(it is writted about LINQ to SQL, but can be applied to LinqConnect as well).
http://msdn.microsoft.com/en-us/library ... aspx#Y1680
(it is writted about LINQ to SQL, but can be applied to LinqConnect as well).