0

I wanna Prevent auto logout from website for 1 day, the solution that I found is

<sessionState mode="InProc" cookieless="false" timeout="1440" />

notice that my authentication mode is none <authentication mode="None" />

Set in my Web.config > system.web tag

I also Used

<authentication mode="Forms">
<forms loginUrl="SignIn.cshtml" protection="All" path="/SignIn" timeout="1440" />
</authentication>

but its not working and authentication expire after 20-30 min and need to login again. any body can help? Is there any other config that I should set?

r.enayati
  • 1
  • 3

2 Answers2

0

Use this configuration in your web config file

<configuration>
   <system.web>
   <sessionState timeout="20"></sessionState>
   </system.web>
</configuration>
rykamol
  • 1,097
  • 1
  • 10
  • 19
  • Thanks bt, as I said its not working.. I even set ( mode="InProc" cookieless="false" ) to make sure about default attributes.. – r.enayati Oct 13 '18 at 09:08
0

There are two timeouts Authentication timeout vs Session timeout. For authentication timeout value set timeout property on <forms> element in web.config.

Check following SO posts:

Forms authentication timeout vs sessionState timeout

Forms Authentication Timeout vs Session Timeout

Mohsin Mehmood
  • 4,156
  • 2
  • 12
  • 18