set the timeout for a specific session

前端 未结 4 489
旧时难觅i
旧时难觅i 2021-01-22 14:13

How I can set the timeout for a session specific in ASP.NET? it is possible? I have two or more sesions in my web application, I need set:

Session[\"foo\"] //exp         


        
4条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-22 14:48

    Since other questions are being closed as duplicates of this question I would like to add this option here for people who may find it useful.

    You can set the Session Timeout manually using the following:

    Session.Timeout = 60
    

    You can read more here:

    https://msdn.microsoft.com/en-us/library/ms525473(v=vs.90).aspx

提交回复
热议问题