about session variables losing its values before time out

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vijay7896
    New Member
    • Jun 2010
    • 1

    about session variables losing its values before time out

    I've got some ASP pages where the session variable values get blown away BEFORE
    the session times out. I can't understand it. For example: if a user
    logs into my ASP app using his password which is stored in a session variable,
    it will be fully accessible for a few minutes and then all of a sudden.....Wham
    session variable with password value is gone. And the session timeout is
    far from expired. The session variable is not being touched in any way
    after it gets initialized with a value.

    Anyone no what could be causing this?

    Thanks.
    Reply With Quote
  • ThatThatGuy
    Recognized Expert Contributor
    • Jul 2009
    • 453

    #2
    Originally posted by vijay7896
    I've got some ASP pages where the session variable values get blown away BEFORE
    the session times out. I can't understand it. For example: if a user
    logs into my ASP app using his password which is stored in a session variable,
    it will be fully accessible for a few minutes and then all of a sudden.....Wham
    session variable with password value is gone. And the session timeout is
    far from expired. The session variable is not being touched in any way
    after it gets initialized with a value.

    Anyone no what could be causing this?

    Thanks.
    Reply With Quote
    Have you defined the Session variable inside global.asax

    Comment

    • Frinavale
      Recognized Expert Expert
      • Oct 2006
      • 9749

      #3
      I would re-examine your code and look for anything that updates that session variable (it is NOT a good idea to store the user's password in session).

      -Frinny

      Comment

      • talhakarkun
        New Member
        • Jun 2010
        • 12

        #4
        Hi vijay7896

        u can solve ur problem to set session timeout property in web.config file by foolowing steps.

        ->GO to Web.config File
        ->Find this tag <configuratio n>
        ->Under <configuratio n> u can see <system.web> tag
        ->in this tag u have just copy & past following line

        <sessionState timeout="30"/>

        ->here 30 means 30 Minuts
        u can change ur session time in above Line


        Talha Karkun

        Comment

        Working...