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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T06:05:59+00:00 2026-06-10T06:05:59+00:00

In my asp.net application I have a few session variables. Seems like only a

  • 0

In my asp.net application I have a few session variables. Seems like only a few minutes on the localhost and also web host, they lose value. This happens periodically not all of the time. I do have cheap go daddy, web hosting, and that could be the problem on the web server. Thank you for any help, this is a big problem.

   <authentication mode="Forms">
      <forms loginUrl="~/Account/Login.aspx" timeout="3600" defaultUrl="~/" name="" />
    </authentication>
    <sessionState mode="InProc" cookieless="false" timeout="80" />

 public static User User
    {
        get
        {
            User userLogin = null;
            object sessionVar = Session[USERLOGIN];
            if (sessionVar != null)
            {
                userLogin = (User) sessionVar;
            }
            return userLogin;
        }
        set { Session[USERLOGIN] = value; }
    }
  • 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-06-10T06:06:00+00:00Added an answer on June 10, 2026 at 6:06 am

    There’s a strong chance that your session is being wiped out on the server from the application pool being stopped and started, timeouts, or a host of other things. The main point is that session variables solely by themselves are unreliable persistent mechanisms.

    If you need information to persist for a logged in user, try storing a cookie on the user’s machine and if the session is null, repopulate it from identifying data in the cookie.

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

Sidebar

Related Questions

I have few global methods declared in public class in my ASP.NET web application.
I have a web application that uses ASP.NET with InProc session handling. Normally, everything
I have standard ASP.NET 4 application. Inside this application there are also few razor
I have a web application in asp.net 3.5 published in apps server.I have few
I have an Asp.net application hosted on a shared server. I have few cache
I have a ASP.NET MVC application and I have a few entries on the
I am using Ext.Net 1.3 with ASP.NET 4.0 application. I have few Ext ComboBox
I'm writing and installer for an ASP.NET application, and I have a few data
I have an asp.net web application .I have a web.config in the root which
I have an asp.net application c# that uses session state to store a variable

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.