locked
Abuou session TimeOut RRS feed

  • Question

  • User373028853 posted

    I have 3 Question

    1:What is maximum session timeout

    2:Can i Set  session timeout for 1 user in runtime??

    3:i have to Declare many  Varaible in session for user sometime is string somtime is DataTable this is bad and is this bad Why?

    Saturday, January 22, 2011 5:04 PM

Answers

  • User-672208662 posted

    3:i have to Declare many  Varaible in session for user sometime is string somtime is DataTable this is bad and is this bad Why?

    Session data is stored in RAM memory set aside for each user session. So it is repeated for each user on your site. If your site has many users, or is on a shared hosting account, this can use a great deal of memory.

    If available memory falls too low, performance of the server will start to degrade.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, January 24, 2011 1:28 PM
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, January 25, 2011 6:33 AM
  • User-481631678 posted

    1:What is maximum session timeout

    Maximum limit is 365 days i.e. 365*24*60 = 525600 mins

    2:Can i Set  session timeout for 1 user in runtime??

    Yes you can do it in Global.asax on Session_start event like this:-

            protected void Session_Start(object sender, EventArgs e)
            {
                Session.Timeout = 10;
            }

    3:i have to Declare many  Varaible in session for user sometime is string somtime is DataTable this is bad and is this bad Why?

    You can store any serilizable object in session .DataTable is also serilizable so you can store that in session. However, storing lots of information in session is not a good practice because it will degrade the performance of your system.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, January 25, 2011 6:38 AM

All replies

  • User533502567 posted

    1:What is maximum session timeout

     

    The maximum limit for session timeout is 525,600 minutes -- i.e., 365 days x 24 hours x 60 min. 

     

    2:Can i Set  session timeout for 1 user in runtime??

    I don't think you can change session time out value for one user.

    3:i have to Declare many  Varaible in session for user sometime is string somtime is DataTable this is bad and is this bad Why?

    You can store string & dataset in session. But don't store large data in session. As ti will severly affects the performance of the application.

    Saturday, January 22, 2011 7:58 PM
  • User-672208662 posted

    3:i have to Declare many  Varaible in session for user sometime is string somtime is DataTable this is bad and is this bad Why?

    Session data is stored in RAM memory set aside for each user session. So it is repeated for each user on your site. If your site has many users, or is on a shared hosting account, this can use a great deal of memory.

    If available memory falls too low, performance of the server will start to degrade.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, January 24, 2011 1:28 PM
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, January 25, 2011 6:33 AM
  • User-481631678 posted

    1:What is maximum session timeout

    Maximum limit is 365 days i.e. 365*24*60 = 525600 mins

    2:Can i Set  session timeout for 1 user in runtime??

    Yes you can do it in Global.asax on Session_start event like this:-

            protected void Session_Start(object sender, EventArgs e)
            {
                Session.Timeout = 10;
            }

    3:i have to Declare many  Varaible in session for user sometime is string somtime is DataTable this is bad and is this bad Why?

    You can store any serilizable object in session .DataTable is also serilizable so you can store that in session. However, storing lots of information in session is not a good practice because it will degrade the performance of your system.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, January 25, 2011 6:38 AM