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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T15:45:45+00:00 2026-05-12T15:45:45+00:00

We are trying to decide the best decision to maintain state across our web

  • 0

We are trying to decide the best decision to maintain state across our web application. We are incline to use Encrypted cookies on the browser, but some of our developers think we should go with Session variables on the server.

The main reasons why I think Cookies are a best approach is just because we will not depend on the app server in a load balance scenario.

The main reason against using cookies is the handling of the cookies could be messy.

What is your take on this topic?

EDIT 1:

Ok. I see from the first posts that neither approach is best. What will be the desire approach then?

  • 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-12T15:45:45+00:00Added an answer on May 12, 2026 at 3:45 pm

    There are two issues here. First is the difference between cookies and session. Unless you are using cookieless sessions (like unique IDs in the URL), session is just a cookie with a very short expiration. You can easily configure an application to share session across multiple servers by using a state server (ScaleOut, Velocity, SQL Server)

    That of course assumes you are using the user’s cookie to store just a unique ID, and linking that back to all the true data on the server, probably in a database. However:

    Storing sensitive data in a user’s cookie, even if encrypted, is not really that secure, because it has to be decryptable, which means it is vulnerable. Any time you choose to use two-way encryption in your application, you are taking on a much heavier cryptography burden to maintain the same level of security. If you don’t have some considerable cryptographic expertise at your disposal, it’s probably best to take the safe route and just not do it.

    So in short, use built-in session or roll your own, either way make sure the only piece of information you send to the client is an unguessable ID that you tie back to the data stored on your end.

    Remembering a user with a cookie:

    Assign… a temporary ID associated with that user, like a GUID. Since GUIDs are astronomically unique and practically collision-proof, they’re also virtually impossible to guess or predict from outside the system.

    The advantage to rolling your own cookie-based session/"remember me" functionality is it gives you more control over how long the information is persisted, distributed, etc. On the other hand, it does represent more work, some of which is re-implementing functionality that comes out-of-the-box with ASP.NET Session. Typically I recommend using what’s already there unless you can clearly articulate some driving business requirement that eliminates that as an option.

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

Sidebar

Related Questions

Trying to decide on the best element to use for a grid view, pretty
I'm trying to decide the best way of having radiobuttons switch around the contents
I'm trying to decide on the best way to customize an initializer for UIView
I'm trying to decide the best way to provide templates for a bunch of
I'm trying to decide the best approach to implementing the majority of CSS styles
Intro I am trying to decide how best to set up my database schema
I'm trying to decide the best way to include an image that is required
I am trying to decide on the best way to store my applications configuration
I'm trying to decide what the best option would be for when an object
I'm trying to decide on the best strategy for accessing the database. I understand

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.