Cannot Extent Session Timeout Without Cookieless Session

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mugs321
    New Member
    • Sep 2006
    • 22

    #1

    Cannot Extent Session Timeout Without Cookieless Session

    Hi all,

    I'm having a problem with extending Session Timeouts... hopin someone can help..

    This is the line under my <system.web> tag in my web.config:
    Code:
    <sessionState mode="InProc" timeout="45" cookieless="AutoDetect"></sessionState>
    The line above does not extend my session. However, if I set cookieless="tru e", it seems to work just fine.

    I don't want the sessionID in my client's address bar and I've looked throughout my code to ensure that the session is not being set elsewhere.

    I should also add that the sessionState tag above will work if I put the value below the .NET default (which I believe the 20min).

    Any thoughts?
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    When you set the timeout to be 45 in your web.config, what does it claim the timeout it when you go to the aspNET config?

    Comment

    • Mugs321
      New Member
      • Sep 2006
      • 22

      #3
      I'm a little unclear what exactly you mean by my ASPNet Config. Are you referring to the server/application configuration?

      I looked in the Aspnet.config in my Framework directory and it contains this:
      Code:
       <?xml version="1.0" encoding="UTF-8" ?>
      <configuration>
          <runtime>
              <legacyUnhandledExceptionPolicy enabled="false" />
              <legacyImpersonationPolicy enabled="true"/>
              <alwaysFlowImpersonationPolicy enabled="false"/>
              <SymbolReadingPolicy enabled="1" />
          </runtime>
      </configuration>
      I ran a trace on my page and I found this in the Headers Collection:
      Code:
      Cookie  -  hidefield=; ASP.NET_SessionId=xs1tth551ae1sai4rkjxetbr
      There was no reference to any timeout values anywhere in my trace.

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        When you go to the IIS configuration (under admin tools)
        And select the exact web(whatever) that you want to look at, for my example "testDB" is the one I look at.
        I go to properties of it, select the ASPNET tab (which will tell you which version of ASPNET the website is configured for) and chose to "edit configuration"
        A new window pops up with a number of tabs, "state management" has the session stuff.
        This tab *SHOULD* reflect what is contained in your web.config, assuming everything is correct.

        Comment

        • Mugs321
          New Member
          • Sep 2006
          • 22

          #5
          Hi there,

          That tab, on both my local machine's IIS and the dev server's IIS, read the same as the values in my web.config. However, the dev server seems to be ignoring these values and returning to the default 20...

          Comment

          • Plater
            Recognized Expert Expert
            • Apr 2007
            • 7872

            #6
            That is only 20mins of not activity.
            If it works on the real server, does it matter on the dev server?

            You do know that every recompile/publish/etc of the website will wipe out the Session state right?

            Comment

            Working...