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 76453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T20:40:33+00:00 2026-05-10T20:40:33+00:00

I am trying to put some distributed caching into play, I’m using this indeXus.Net

  • 0

I am trying to put some distributed caching into play, I’m using this indeXus.Net Shared Cache .

It Requires that the object being cached is serializable, which it is here is the class object.

[Serializable] public class Members  {     public Members()     {}      public Members(string aspnetusername, string aspnetpassword,         string emailaddr,string location)         : this(0,0,aspnetusername, aspnetpassword,emailaddr,DateTime.Now, location,         0,0,DateTime.Now,DateTime.Now,DateTime.Now,false)     { }      public Members(Int64? row,int memberid, string aspnetusername, string aspnetpassword,         string emailaddr,DateTime datecreated, string location, int daimokugoal, int previewimageid,         DateTime lastdaimoku, DateTime lastnotifed, DateTime lastactivitydate, bool isactivated)     {         this.Row = row;         this.MemberID = memberid;         this.Aspnetusername = aspnetusername;         this.Aspnetpassword = aspnetpassword;         this.EmailAddr = emailaddr;         this.DateCreated = datecreated;         this.Location = location;         this.DaimokuGoal = daimokugoal;         this.PreviewImageID = previewimageid;         this.LastDaimoku = lastdaimoku;         this.LastNotefied = lastnotifed;         this.LastActivityDate = lastactivitydate;         this.IsActivated = this.IsActivated;         this.Details = new LazyList<MemberDetails>();         this.Blogs = new LazyList<MemberBlogs>();         this.Daimoku = new LazyList<MemberDaimoku>();         this.Determinations = new LazyList<MemberDeterminations>();         this.Encouragements = new LazyList<MemberEncouragements>();         this.Entries = new LazyList<MemberEntries>();         this.Friends = new LazyList<MemberFriends>();         this.Stats = new LazyList<MemberStats>();       }       public Int64? Row { get; set; }         public int MemberID { get; set; }    public string Aspnetusername { get; set; }    public string Aspnetpassword { get; set; }    public string EmailAddr { get; set; }    public DateTime DateCreated { get; set; }    public string Location { get; set; }    public int DaimokuGoal { get; set; }    public int PreviewImageID { get; set; }    public DateTime LastDaimoku { get; set; }    public DateTime LastNotefied { get; set; }    public DateTime LastActivityDate { get; set; }    public bool IsActivated { get; set; }    public LazyList<MemberDetails> Details { get; set; }    public LazyList<MemberBlogs> Blogs { get; set; }    public LazyList<MemberDaimoku> Daimoku { get; set; }    public LazyList<MemberDeterminations> Determinations { get; set; }    public LazyList<MemberEncouragements> Encouragements { get; set; }    public LazyList<MemberEntries> Entries { get; set; }    public LazyList<MemberFriends> Friends { get; set; }    public LazyList<MemberStats> Stats { get; set; } } 

The LINQtoSql is this that populates this class.

  public IQueryable<Members> GetMemberInfo()       {           using (var t = new TransactionScope(TransactionScopeOption.Required,                     new TransactionOptions { IsolationLevel = System.Transactions.IsolationLevel.ReadUncommitted }))           {               var results = from m in _datacontext.ViewMembers                             let details = GetMemberDetails(m.MemberID)                             let determinations = GetMemberDeterminations(m.MemberID)                             let daimoku = GetMemberDaimoku(m.MemberID)                             let entries = GetMemberEntries(m.MemberID)                             let blogs = GetMemberBlogs(m.MemberID)                             let encouragements = GetMemberEncouragements(m.MemberID)                             let friends = GetMemberFriends(m.MemberID)                             let points = GetMemberStats(m.MemberID)                             select new Members                             {                                 Row = m.Row,                                 MemberID = m.MemberID,                                 Aspnetusername = m.Aspnetusername,                                 Aspnetpassword = m.Aspnetpassword,                                 EmailAddr = m.EmailAddr,                                 DateCreated = m.DateCreated,                                 Location = m.Location,                                 DaimokuGoal = m.DaimokuGoal,                                 PreviewImageID = m.PreviewImageID,                                 LastDaimoku = m.LastDaimoku.Value,                                 LastNotefied = m.LastNotefied.Value,                                 LastActivityDate = m.LastActivityDate.Value,                                 IsActivated = m.IsActivated,                                 Details = new LazyList<MemberDetails>(details),                                 Determinations = new LazyList<MemberDeterminations>(determinations),                                 Daimoku = new LazyList<MemberDaimoku>(daimoku),                                 Entries = new LazyList<MemberEntries>(entries),                                 Blogs = new LazyList<MemberBlogs>(blogs),                                 Encouragements = new LazyList<MemberEncouragements>(encouragements),                                 Friends = new LazyList<MemberFriends>(friends),                                 Stats = new LazyList<MemberStats>(points)                             };               return results;           }       } 

But for some reason I am getting this error

System.Runtime.Serialization.SerializationException: Type ‘System.Data.Linq.DataQuery`1[[DaimokuBeta.MVC.Data.MemberDetails, DaimokuBeta.MVC.Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]’ in Assembly ‘System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’ is not marked as serializable.

MemberDetails is serializable too..so not sure why it thinks it can’t be serialized Any ideas?

  • 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. 2026-05-10T20:40:33+00:00Added an answer on May 10, 2026 at 8:40 pm

    I believe that it’s your LazyList implementation that cannot be serialized because the exception is telling us that the generic type DataQuery (from assembly System.Data.Linq) is not serializable. Is this type connected to your LazyList in any way?

    If you are trying to cache the Members DTO (data transfer object) it’s probably not a good idea to be applying lazy loading because it may only be executed in a very unpredictable moment.

    Cache should usually be applied to data that has already been loaded/computed. Otherwise there may not be much point in using cache.

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

Sidebar

Related Questions

I am trying to put some jquery UI code into an existing asp.net app,
I am trying to put some views into a Fragment using a LayoutInflater. They
I'm trying to put some sites i crawled into a shelve, but the shelve
I'm trying to put some HTML content inside <content:encoded> tags using ROME and its
Hello everyone I've been trying to put some objects in an ASP.NET list box
I'm looking for some assistance with some code. I'm trying to put this to
I trying to put some images into the hub tile as the window phone
I'm trying to put some simple jQuery code into the Wordpress header (usually just
I'm trying to put some json images into a UIScrollView and i'm hitting a
I'm trying to put some text inside an input, tried this: $(#someText).click(function () {

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.