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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:27:45+00:00 2026-05-23T10:27:45+00:00

I am trying to figure out the pros and cons of using sessionid based

  • 0

I am trying to figure out the pros and cons of using sessionid based authentication vs cookie based authentication

As far as I can see in cookie based authentication

  • User submits a login request sending their credentials
  • The credentials are checked against a database
  • Cookie will be set with the user details
  • This will be done over https and the cookies will be encrypted.
  • In .net if this is the authcookie user identity will be set
  • The db is hit just once and subsequent calls just check the auth cookie

In case of session based authentication

  • User submits a login request sending their credentials
  • The credentials are checked against a database
  • A session id is generated and is also stored in a db
  • Cookie will be set with the user details and a generated session id
  • Subsequent calls will compare the session id against the one in the database
  • The db is hit every time

Questions

Is there any reason to prefer one over the other? Is the cookie based less secure (even if you encrypt and sign them)? Is the performance of session based worse since it hits the database during each call? I have seen several sites leaning one way or the other but could not get a clear picture of what approach to use. Any discussions/suggestions would be greatly appreciated.

  • 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-23T10:27:46+00:00Added an answer on May 23, 2026 at 10:27 am

    I’m having a hard time digesting this question. To my knowledge, forms-based authentication comes in two flavors: cookies and cookieless. Cookie-based authentication is preferred.

    In the cookie-based version, the user gets a coookie whose value is an encrypted Forms Authentication Ticket. The cookie is encrypted at the server. Unless the encryption key is shared from machine.config or over-written in Web.config, the cookie can only be decrypted by the server that issued it. I believe the encryption is AES, which is very secure.

    In the cookieless approach, the payload of the cookie is put in the url using an HTTPModule. This approach is only used when the device does not support cookies (rare). The cookieless approach is not preferred – it makes AJAX more difficult.

    See:

    http://msdn.microsoft.com/en-us/library/1d3t3c61.aspx

    and

    http://support.microsoft.com/kb/910443

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

Sidebar

Related Questions

I am a newbie trying to figure out the pros and cons of using
Trying to figure out how I can do this properly. The print_r looks like
I have this line of code and am trying to figure out the pros
i'm trying to figure out a way to record a user plays without slowing
I've been trying figure out how to add a handler to a method using
Trying to figure out how to create a directory on the file system using
Trying to figure out how to clear my label's text...clear it out. So far
Im trying figure out how I can change the value of a specific cell
im trying to figure out how i can do this. i have a list
Trying to figure out the byte[] equivalent of this string getText = string.Empty; using

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.