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

  • Home
  • SEARCH
  • 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 3278180
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:27:09+00:00 2026-05-17T19:27:09+00:00

I recently changed the Session State to use SQL server and then realized not

  • 0

I recently changed the Session State to use SQL server and then realized not all my entities were serializable.

Now trying to find out which entities are being put in session throughout the code seems to be a big pain, so I was thinking why not make all of them serializable?

Will this have any performance hit? Why are classes not marked as Serializable by default?

  • 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-17T19:27:10+00:00Added an answer on May 17, 2026 at 7:27 pm

    Adding [Serializable] doesn’t impact performance; simply most classes don’t need to be serializable, and the ability to store internal state doesn’t always make sense – it only really makes sense for “entity”or “DTO” objects.

    Some things to watch: make sure events aren’t serialized; mark then [field: NonSerialized] – otherwise you might grow more data than you expect ;p

    Also; BinaryFormatter can be… rather voluminous. If you want smaller data, I would suggest looking at (for example) protobuf-net (100% free), which you can hook via ISerializable – it is generally significantly more efficient than BinaryFormatter. Let me know if you are interested in more details.

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

Sidebar

Related Questions

I just recently changed out all my hard drives and in the process of
I have Apache 2 running on a VPS server (running Debian). I recently changed
Recently our Subversion (SVN) server was changed and we did a svn switch .
Recently, I started changing some of our applications to support MS SQL Server as
I've recently inherited an application that makes very heavy use of session, including storing
Recently I changed the hostname of my computer and now every time I start
I've recently changed to Mate as a framework for flex. However am running into
When project is stopped (not in the debugging state) and you press F10, normally
We recently upgraded our PHP and apache versions on our server. Prior to this
I recently changed a word in my query string in my url, which causes

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.