简体   繁体   中英

How to write session timeout in asp.net

i am new to asp.net..please help me to write code for setting session timeout and how to implement in all pages,i tried out using web config method,but not getting,i am nearing to deadline. This is my code

From code:

Session.Timeout = 60; // this will set 60 min timout

From config:

<sessionState timeout="60" />

Using Web.config

<sessionState
timeout="number of minutes"............

Full reference HERE !

or

Using Forms authentication

<system.web>
<authentication mode="Forms">
      <forms timeout="50"/>
</authentication>  
<sessionState timeout="60"  />
</system.web>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM