Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 715081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T05:08:49+00:00 2026-05-14T05:08:49+00:00

I have this huge domain object(say parent) which contains other domain objects. It takes

  • 0

I have this huge domain object(say parent) which contains other domain objects. It takes a lot of time to “create” this parent object by querying a DB (OK we are optimizing the DB). So we decided to cache it using memcached (with northscale to be specific)

So I have gone through my code and marked all the classes (I think) as [Serializable], but when I add it to the cache, I see a Serialization Exception getting thrown in my VS.net output window.

var cache = new NorthScaleClient("MyBucket");
cache.Store(StoreMode.Set, key, value);

This is the exception:

A first chance exception of type 'System.Runtime.Serialization.SerializationException' occurred in mscorlib.dll

SO my guess is, I have not marked all classes as [Serializable]. I am not using any third party libraries and can mark any class as [Serializable], but how do I find out which class is failing when the cache is trying to serialize the object ?

Edit1: casperOne comments make me think. I was able to cache these domain object with Microsoft Cache Application Block without marking them [Serializable], but not with NorthScale memcached. It makes me think that there might be something to do with their implementation, but just out of curiosity, am still interested in finding where it fails when trying to add the object to memcached

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T05:08:49+00:00Added an answer on May 14, 2026 at 5:08 am

    This is how I resolved it. NorthScale was not throwing any error when the serialization failed. I serialized my domain object with Binary Serialization and was able to find out which classes were failing (since they were not marked as [Serializable]). Fixed it and it worked

    Seeing the results of protobuf-net I am thinking about switching my serializer too

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have this huge and slow code that takes forever to run.... Im
I'm still working with this huge list of URLs, all the help I have
I have a huge problem with this method im trying to make. I have
I have a huge string that looks like this: Text Text Text Text Text
I had a huge file for creating this GUI and I have shortened it
I have a map defined like this std::map<some_key_type, std::string::iterator> mIteratorMap; And a huge string
I have this project that displays hierarchical data with huge amounts of text, and
For some reason I have this huge brain fart today. >.< I have a
I have the following domain object : class DbDeployment { static constraints = {
I have this huge switch case with nested switch case statements in it that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.