How to Set Session Timeout in ASP.Net

There are two way to set session timeout property in ASP.Net.

First

Go to web.config file and add following script.

<configuration>

  <system.web>

    <sessionState mode="InProc" cookieless="true"timeout="60"/>

    </sessionState>

  </system.web>

</configuration>

Second

Go to global.asax file and write the code below:

void Session_Start(object sender, EventArgs e)

{

Session.Timeout = 60;

}

 

Ebook Download
View all
Learn
View all