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. session timeout

session timeout

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netsysadminquestion
5 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.
  • D Offline
    D Offline
    Dot Net Dev
    wrote on last edited by
    #1

    Hi, I am working on ASP.NET C# application. Everything is working fine on the local machine but on the server my application's session timeout after two minutes. I haven't set the session timeout in web.config. Please tell me the reason of this. Also tell me what is the unit of session timeout minute, second or millisecond. Thanks Sonia

    L N 2 Replies Last reply
    0
    • D Dot Net Dev

      Hi, I am working on ASP.NET C# application. Everything is working fine on the local machine but on the server my application's session timeout after two minutes. I haven't set the session timeout in web.config. Please tell me the reason of this. Also tell me what is the unit of session timeout minute, second or millisecond. Thanks Sonia

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Sonia Shahid wrote:

      I haven't set the session timeout in web.config

      Set Session timeout as

      <sessionState mode="InProc"
      stateConnectionString="tcpip=127.0.0.1:42424"
      sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
      cookieless="false"
      timeout="50" />

      Sonia Shahid wrote:

      Also tell me what is the unit of session timeout minute, second or millisecond

      Minutes

      Regards Aman Bhullar www.arlivesupport.com[^]

      1 Reply Last reply
      0
      • D Dot Net Dev

        Hi, I am working on ASP.NET C# application. Everything is working fine on the local machine but on the server my application's session timeout after two minutes. I haven't set the session timeout in web.config. Please tell me the reason of this. Also tell me what is the unit of session timeout minute, second or millisecond. Thanks Sonia

        N Offline
        N Offline
        N a v a n e e t h
        wrote on last edited by
        #3

        Sonia Shahid wrote:

        but on the server my application's session timeout after two minutes.

        Session will end when ASP.NET worker process recycles. You need to make sure your code is not doing something like updating web.config at the run-time that will recycle the worker process.

        Sonia Shahid wrote:

        Also tell me what is the unit of session timeout minute, second or millisecond.

        It is in minutes.

        Best wishes, Navaneeth

        P 1 Reply Last reply
        0
        • N N a v a n e e t h

          Sonia Shahid wrote:

          but on the server my application's session timeout after two minutes.

          Session will end when ASP.NET worker process recycles. You need to make sure your code is not doing something like updating web.config at the run-time that will recycle the worker process.

          Sonia Shahid wrote:

          Also tell me what is the unit of session timeout minute, second or millisecond.

          It is in minutes.

          Best wishes, Navaneeth

          P Offline
          P Offline
          Paulo Zemek
          wrote on last edited by
          #4

          Try setting the timeout in the Web.config. If you don't set it, I think it could still not be the default value if the Machine.config has a different value for it. Also, any page can reset the time-out.

          G 1 Reply Last reply
          0
          • P Paulo Zemek

            Try setting the timeout in the Web.config. If you don't set it, I think it could still not be the default value if the Machine.config has a different value for it. Also, any page can reset the time-out.

            G Offline
            G Offline
            Gamzun
            wrote on last edited by
            #5

            Yes, you're right. That's the root config applies if nothing is configured at lower level. Define your session timeout and it will work as charm.

            Please don't forget to mark 'Good Answer', if you find it really a good one! Kashif

            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