set the timeout for a specific session

前端 未结 4 487
旧时难觅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:55

    You can configure the timeout for a session in the Web.config file:

    
        
    
    

    This is the default mode (InProc) for ASP.NET. As rockinthesixtring said in his comment, you can't configure the timeout for individual objects in the session, just the session as a whole.

    ASP.NET Session State Overview

提交回复
热议问题