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. Losing Session ID

Losing Session ID

Scheduled Pinned Locked Moved ASP.NET
csharphelpquestion
6 Posts 4 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.
  • D Offline
    D Offline
    dptalt
    wrote on last edited by
    #1

    Sometimes some of my session ids loose their values when navigating from page to page on my an ASP .Net site causing errors. This happens when using Microsoft IE. When I run it in Foxfire this does not happen. What could be the problem?

    S 1 Reply Last reply
    0
    • D dptalt

      Sometimes some of my session ids loose their values when navigating from page to page on my an ASP .Net site causing errors. This happens when using Microsoft IE. When I run it in Foxfire this does not happen. What could be the problem?

      S Offline
      S Offline
      SimulationofSai
      wrote on last edited by
      #2

      FoxFire??:confused: Browsers dont have anything to do with missing session variables. Session variables are stored in the web server and the browser does not have any control over their lifetime or value. 1. Check your code to see if the session variables are being reset anywhere you dont want them to be 2. The default session duration in IIS is 20 minutes. If you're in a page longer than that, doing nothing, then that session is considered as "closed" Regards, SG

      K 1 Reply Last reply
      0
      • S SimulationofSai

        FoxFire??:confused: Browsers dont have anything to do with missing session variables. Session variables are stored in the web server and the browser does not have any control over their lifetime or value. 1. Check your code to see if the session variables are being reset anywhere you dont want them to be 2. The default session duration in IIS is 20 minutes. If you're in a page longer than that, doing nothing, then that session is considered as "closed" Regards, SG

        K Offline
        K Offline
        Keith Andersch
        wrote on last edited by
        #3

        I think it depends on what kind of session storage is being used: passing the session ID through the URL or using cookies. I want to say the cookie method is default. I have some session variables declared with everything at default. When I open up the developer toolbar in IE 6, I can clear the session cookies. That will effectively grind my application to a halt on the next postback. I can't find where the hell this session ID is so I can't say without a doubt that's what is going on.

        V 1 Reply Last reply
        0
        • K Keith Andersch

          I think it depends on what kind of session storage is being used: passing the session ID through the URL or using cookies. I want to say the cookie method is default. I have some session variables declared with everything at default. When I open up the developer toolbar in IE 6, I can clear the session cookies. That will effectively grind my application to a halt on the next postback. I can't find where the hell this session ID is so I can't say without a doubt that's what is going on.

          V Offline
          V Offline
          VbManVzw
          wrote on last edited by
          #4

          This is correct with .Net session ID's are now stored in cookies and they are somewhat encrypted which is why you can't find them. In ASP they were server side but that can create a load. You can change where the session ID's are stored and if you have a small audience I would say do it server side. Hope this helps.

          D 1 Reply Last reply
          0
          • V VbManVzw

            This is correct with .Net session ID's are now stored in cookies and they are somewhat encrypted which is why you can't find them. In ASP they were server side but that can create a load. You can change where the session ID's are stored and if you have a small audience I would say do it server side. Hope this helps.

            D Offline
            D Offline
            dptalt
            wrote on last edited by
            #5

            How do you change where the session ID's are stored? I would like to store them server side. On the page I'm having trouble there are about 12 session id's.

            V 1 Reply Last reply
            0
            • D dptalt

              How do you change where the session ID's are stored? I would like to store them server side. On the page I'm having trouble there are about 12 session id's.

              V Offline
              V Offline
              VbManVzw
              wrote on last edited by
              #6

              Here you go: The magic is in the web.config: (modify accordingly) From my assumptions of your code and question, I am assuming .Net1.1 and you are not using a state farm or SQL for session management so select: mode=InProc andn cookieless=true Here are more resources: MSDN Link: http://msdn2.microsoft.com/en-us/library/h6bb9cz9(VS.71).aspx session FAQ: http://www.eggheadcafe.com/articles/20021016.asp cookiesless session problems: http://www.eggheadcafe.com/PrintSearchContent.asp?LINKID=401 ~We are the gifted few to have such awesome jobs! :)

              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