Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | Membase | Memcached Server 1.0.3

NS Memcached + Enyim does not work with ASP.net DataRow

3 replies [Last post]
  • Login or register to post comments
Sat, 09/18/2010 - 04:10
MMGN.com
Offline
Joined: 07/14/2010
Groups: None

Discovered this in our prod server, and after a few tests, verified this indeed causes an issue.

Here is the exception from Enyim (v2.3) client, we are using NS Memcached v1.0.3

[INDENT]
System.Runtime.Serialization.SerializationException: Type 'System.Data.DataRow' in Assembly 'System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' is not marked as serializable. at System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(RuntimeType type) at System.Runtime.Serialization.FormatterServices.GetSerializableMembers(Type type, StreamingContext context) at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitMemberInfo() at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter) at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck) at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck) at Enyim.Caching.Memcached.DefaultTranscoder.Enyim.Caching.Memcached.ITranscoder.Serialize(Object value) in d:\EnyimMemcached\Enyim.Caching\Memcached\Transcoders\DefaultTranscoder.cs:line 101 at Enyim.Caching.MemcachedClient.PerformStore(StoreMode mode, String key, Object value, UInt32 expires, UInt64& cas) in d:\EnyimMemcached\Enyim.Caching\MemcachedClient.cs:line 290[/INDENT]

Top
Sun, 09/19/2010 - 08:24
Perry Krug
Offline
Joined: 06/02/2010
Groups: None

Thanks for this, I will look into it.

Seems like the error is being caused because the System.Data.DataRow is not marked as serializable. Do you know if this is something you can change or needs to be handled elsewhere?

Thanks.

Perry

__________________

Forum support is great for free but sometimes you need a guaranteed response time and dedicated resources for your questions or issues.
Consider purchasing enterprise-level support from Membase: http://www.membase.com/products-and-services/overview
Call or email "sales -at- membase -dot- com" today!

Top
Sun, 09/19/2010 - 08:32
Attila Kisko
Offline
Joined: 04/22/2010
Groups: None

Actually the situation is the reverse: "DataRow does not work with memcached"

Memcached is a byte[] store, in order to store anything insde it, it must be convertible to a series of bytes. The primitive types are handled by the client, while complex types are serialized using the standard serialization methods of .NET. (that's why you need to mark your custom classes as serializable)

One thing you could try is to add your rows to a DataTable whihc in fact is serializable and will handle the row serialization for you.

Top
Sun, 09/19/2010 - 18:16
MMGN.com
Offline
Joined: 07/14/2010
Groups: None

Thanks, this is actually an error we didn't expect, since datatable works, but strange why MS labelled datarow as a non-serializable data type.

We've changed all of our datarows to Dictionary, and it is now fine.

Thanks guys!

Top
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker