Session Variable loses its value - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Session Variable loses its value

Well, i got a site. It works perfectly most of the time, but sometime the session variable don't pass on correctly, and it messes up the whole thing. So is there any good solution to it.
P.S. My session variables are used to keep login status

Comments

  • gizzugizzu Posts: 42Member
    Well, if you do not have more information, it's difficult to answer your question. Maybe you stay a little too long at one page before clicking to next page. If this is the problem, try increasing the Session timeout when you create the session:

    Session.Timeout = 60

    This makes the session stay fresh for 60 minutes after users last click.

    Hope this helps.
    //Gizzu

  • namoralesnamorales Posts: 4Member
    : Well, if you do not have more information, it's difficult to answer your question. Maybe you stay a little too long at one page before clicking to next page. If this is the problem, try increasing the Session timeout when you create the session:
    :
    : Session.Timeout = 60
    :
    : This makes the session stay fresh for 60 minutes after users last click.
    :
    : Hope this helps.
    : //Gizzu
    :
    :

    its posible, the client is turned off the cookies, then in web.config in SessionState have this values.





  • johnlyjohnly Posts: 3Member
    Session may be getting expired before you pass to the next page.
    Well... I will recommend you to change your web.config code like this.



    Here I have changed the session state to a seperate worker process (ASP state management server).

    It is recommended to move your session into the stateserver or SQL server state management in the production environment.

    Note: You need to start the 'ASP.NET State Service' windows service on the web server in order to make this code work.

    This will solve your problem related to session getting timed out before 20 minutes

    [link=http://www.fmcgdirectory.com]FMCG Directory[/link]
    : Well, i got a site. It works perfectly most of the time, but
    : sometime the session variable don't pass on correctly, and it messes
    : up the whole thing. So is there any good solution to it.
    : P.S. My session variables are used to keep login status
    :

Sign In or Register to comment.