I have an ASP.NET MVC4 application where I am implementing sessionTimeout like:
<configuration>
<system.web>
<sessionState timeout="2"></sessionState>
</system.web>
</configuration>
And in authentication:
<configuration>
<system.web>
<authentication mode="Forms">
<forms loginUrl="~/Account/LogOn" timeout="1" />
</authentication>
</system.web>
</configuration>
After the session has expired (2 mins), I need to redirect to the logon page, but the redirection doesn't occur.
How can I change the code so that it will redirect?