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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T01:34:12+00:00 2026-05-13T01:34:12+00:00

I apologize if this has been asked before, but I haven’t quite found the

  • 0

I apologize if this has been asked before, but I haven’t quite found the specific question I have in my head.

For the website I am building (using ASP.NET MVC) – performance is an important feature. Also, there is a chance that the site could be hosted in an environment where the Application Pool gets recycled every 20 minutes (or sooner if the memory threshold is reached). I would like to be completely independent of relying on session variables and instead, store a GUID-like value in a cookie. My reasoning is – I don’t know how long the session will last because of the AppPool recycling and don’t want their session to timeout prematurely and cause them to have to login repeatedly.

The GUID value in the cookie would act as a lookup key to a table where I store session-like information (a user ID value, etc.). So if I needed that data I could retrieve it from the database. I would still make use of the Session_OnEnd event to clear out that session table of rows with a “last activity” value of more than 20 minutes old (or however long sessions are configured to last). So I guess I would still be using session state, just not session variables.

My concern though, again, is about performance. Therefore, I was curious if there are any better methods for avoiding use of session variables while still maintaining the ability to know things about who the user is and manage their visits to the site in a “session-like” way. I am still a newbie to MVC but have plenty of experience in ASP.NET over the years so, I hope my question makes sense!

EDIT: I’m kind of shying away from wanting to use SQL Session State because I will likely be in a shared sql server hosting environment and don’t think I will have a login with the ability to create/run jobs if necessary for deletion of expired sql session data, etc. Are there any real drawbacks to depending on Session_OnEnd with a cookie in the AppPool recycling scenario? Could Session_OnEnd not execute for sessions that are current when the AppPool recycles?

  • 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-13T01:34:13+00:00Added an answer on May 13, 2026 at 1:34 am

    You are assuming Sessions are only stored in the working process, you can have SQL State sessions, check this link before going any further

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

Sidebar

Related Questions

I apologize in advance if this has been asked before, but I haven't been
I apologize if this question has been asked before, but my case is a
Apologies if this has been asked before, but I could not find a question
I apologize if this has been asked before but I am hoping for an
If this has been asked before, I apologize but this is kinda of a
Apologies if this has been asked before but it seems an obvious question for
First off, I apologize if this question has been asked before. I've done a
I apologise if this question has already been asked on here before but I
I apologize if this has been asked before. I searched but did not find
I apologize if this has been asked before, but I believe that for me,

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.