Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. ASP.net Sessions Dropping

ASP.net Sessions Dropping

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netquestion
7 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Ken Slight
    wrote on last edited by
    #1

    Helllo, I have an app that seems to create a new session randomly when selecting between pages (I view the Session.IsNewSession variable to check.) My understanding is that the only way a session can end and start again is if the browser is closed, or the user reaches the SessionState timeout value. Has anyone else seen this, and do you have any ideas? Thanks, Ken

    R M J 3 Replies Last reply
    0
    • K Ken Slight

      Helllo, I have an app that seems to create a new session randomly when selecting between pages (I view the Session.IsNewSession variable to check.) My understanding is that the only way a session can end and start again is if the browser is closed, or the user reaches the SessionState timeout value. Has anyone else seen this, and do you have any ideas? Thanks, Ken

      R Offline
      R Offline
      Ranjith I
      wrote on last edited by
      #2

      How about Session.Abandon() VB,ASP, C#, ASP.NET, VB.NET, Oracle, SQL Server. -------------------------------------------------- Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." - Albert Einstein (1879-1955) "C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg." - Bjarne Stroustrup

      1 Reply Last reply
      0
      • K Ken Slight

        Helllo, I have an app that seems to create a new session randomly when selecting between pages (I view the Session.IsNewSession variable to check.) My understanding is that the only way a session can end and start again is if the browser is closed, or the user reaches the SessionState timeout value. Has anyone else seen this, and do you have any ideas? Thanks, Ken

        M Offline
        M Offline
        Marcie Jones
        wrote on last edited by
        #3

        Hi Ken, Sessions also can be dropped when the AppDomain is recycled, which can happen quite often in ASP.NET if you don't have enough RAM in your server. Check your event logs to be certain of what is happening. If it is AppDomains being recycled, the easiest solution is to add RAM, but if that's not an option for you, you can increase the process recycling threshold in your machine.config file. Marcie CP Blog[^]

        K 1 Reply Last reply
        0
        • K Ken Slight

          Helllo, I have an app that seems to create a new session randomly when selecting between pages (I view the Session.IsNewSession variable to check.) My understanding is that the only way a session can end and start again is if the browser is closed, or the user reaches the SessionState timeout value. Has anyone else seen this, and do you have any ideas? Thanks, Ken

          J Offline
          J Offline
          Jesse Squire
          wrote on last edited by
          #4

          Are you in a web farm, by any chance? If so, check the sticky option settings of the load balancer [most, but not all, have them.] If the sticky bit is not set, the user will be bounced from server to server at the whim of the load balancer. In my experience, the user will have a new Session generated each time they move from one server to another, even if they've been there recently. Hope that helps. :)   --Jesse

          K A 2 Replies Last reply
          0
          • M Marcie Jones

            Hi Ken, Sessions also can be dropped when the AppDomain is recycled, which can happen quite often in ASP.NET if you don't have enough RAM in your server. Check your event logs to be certain of what is happening. If it is AppDomains being recycled, the easiest solution is to add RAM, but if that's not an option for you, you can increase the process recycling threshold in your machine.config file. Marcie CP Blog[^]

            K Offline
            K Offline
            Ken Slight
            wrote on last edited by
            #5

            Thanks for the response. Hmmmm, I have no control over the server since it's with a host. Hopefully it's not the case that the server is the problem, or I'll need to find a new host. I'll try a few simple tests to see if I can easily repoduce the problem. Thanks again, Ken

            1 Reply Last reply
            0
            • J Jesse Squire

              Are you in a web farm, by any chance? If so, check the sticky option settings of the load balancer [most, but not all, have them.] If the sticky bit is not set, the user will be bounced from server to server at the whim of the load balancer. In my experience, the user will have a new Session generated each time they move from one server to another, even if they've been there recently. Hope that helps. :)   --Jesse

              K Offline
              K Offline
              Ken Slight
              wrote on last edited by
              #6

              Thanks Jesse; that helps and does make sense. It's looking like the problem is on the server which is hosted somewhere else. Ken

              1 Reply Last reply
              0
              • J Jesse Squire

                Are you in a web farm, by any chance? If so, check the sticky option settings of the load balancer [most, but not all, have them.] If the sticky bit is not set, the user will be bounced from server to server at the whim of the load balancer. In my experience, the user will have a new Session generated each time they move from one server to another, even if they've been there recently. Hope that helps. :)   --Jesse

                A Offline
                A Offline
                Albert Pascual
                wrote on last edited by
                #7

                SQL ASPSession table rules!!

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups