Use timeout in web.config, can also use timespan--20 minutes is default, also The timeout attribute cannot be set to a value that is greater than 525,601 minutes (1 year) for the in-process and state-server modes.
1.In Web Config File:
<system.web>
<sessionState timeout="1440" />
<authentication mode="Forms">
<forms loginUrl="Default.aspx" protection="All" timeout="1440" name=".ASPXAUTH" path="/" requireSSL="false" slidingExpiration="true" defaultUrl="Home/Default.aspx" cookieless="UseDeviceProfile" enableCrossAppRedirects="false">
</forms>
</authentication>
<httpRuntime maxRequestLength="2097151" executionTimeout="43200" useFullyQualifiedRedirectUrl="false" minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="100"/>
</system.web>
2.If you are using ASP.NET 2.0, use have to check in the IIS.
Open the IIS, click on the Application Pools, Select the Application pool for your application.
Right Click on that, Select Properties.
In the Performance tab, Set the idle timeout as your desired minutes for "shutdown worker processes after being idle for ..... minutes".
3.In IIS, Right click the web sites Select Properties.
In HomeDirectory tab ,Click the Configuration Select Options tab and
Set Session time out:1440
4.In IIS, Select the ASP.NET tab Click Edit Configuration
Select StateManagement tab and set Session timeout:1440 and
Session State Mode:InProc mode.
Finally Restart the IIS.
Now check the Session Time out.
Regards
Prince Antony G