Reputation: 7979
<authentication mode="Forms">
<forms loginUrl="~/Account/LogOn" timeout="100" defaultUrl="~/" name="Auth"/>
</authentication>
AND
<sessionState timeout ="1"></sessionState>
Among this 2 which determines the time out period of active log in, if a I am using sql server to store sessions state?
(me in asp.net mvc 2)
Upvotes: 0
Views: 568
Reputation: 52241
<authentication mode="Forms">
<forms loginUrl="~/Account/LogOn" timeout="100" defaultUrl="~/" name="Auth"/>
</authentication>
The above code will determine your logged in user's session time. This means that after 100 minutes of inactivity, a user will be prompted to login again. The default timeout is 30 Minutes if not specified.
<sessionState timeout ="1"></sessionState>
The session timeout configuration setting applies only to ASP.NET pages. Changing the session timeout value does not affect the session time-out for ASP pages.
Upvotes: 0
Reputation: 1585
FormsAuthentication and Session are two different mechanisms, which use two different cookies. There timeouts are independent.
If you want to know when a Session expires (which you're storing in Sql or otherwise) then the SessionState timeout determines that.
Upvotes: 1