You must Sign In to post a response.
  • Category: ASP.NET

    How to increase session time in web.Config file

    Hello Developers ,

    I want to increase session time , So anyone could please tell me what is the default session time exactly.(20 minutes am right)

    And How to i am increase session time in a website

    Thanking you,

    Paul. S
  • #763240

    you can use following in your config file:

    timeout="number of minutes/>

    Anjali Bansal

    ~Give your best and lead the world

  • #763242

    You can use this below mentioned code..

    <sessionState mode="InProc" timeout="120" cookieless="false" />

  • #763251
    Hi Paul,

    I guess you got the solution, if you still having doubt how to increase the timeout then please let us know.

    Give respect to your work, Instead of trying to impress your boss.

    Blog :

  • #763261
    Hello Paul Raj,

    You can do it by following code :

    <sessionState mode="Custom"
    customProvider="DefaultSessionProvider" Trusted_Connection=yes"
    cookieless="false" timeout="20" />

    Note --> You can set the timeout as per your need. Timeout can be set only in minutes.

    Hope this will help you.

    Nirav Lalan
    DNS Gold Member
    "Failure is the path of least persistence"

  • #763343
    If you are using ASP.NET 2.0 you have to handle it in the IIS .

    Otherwise you can handle in web.config as follows

    <sessionState mode="InProc" timeout="120" cookieless="false" />

    You can handle it in the "FormsAuthenticationTicket" also

    By Nathan
    Direction is important than speed

  • Sign In to post your comments