mmalik15
asked on
How to redirect user to a login page after session time out
Hi
I am using forms authentication for my application. I manage to create login page and do the session time out but even after the session is time out when user clicks on link the user is not redirected to the login page. My web.config has the following code for authentication,authorizati on and session time out
<authentication mode="Forms">
<forms path="/" loginUrl="Login.aspx"/>
</authentication>
<authorization>
<deny users="?" />
</authorization>
<sessionState mode="InProc" stateConnectionString="tcp ip=127.0.0 .1:42424" sqlConnectionString="data
source=127.0.0.1;Trusted_C onnection= yes" cookieless="false" timeout="1" />
and my code on the Login page button click is
Dim ticket As New FormsAuthenticationTicket( m_username , False, 1)
FormsAuthentication.Redire ctFromLogi nPage(m_us ername, False)
Any ideas how can we redirect user to a login page
Thanks
I am using forms authentication for my application. I manage to create login page and do the session time out but even after the session is time out when user clicks on link the user is not redirected to the login page. My web.config has the following code for authentication,authorizati
<authentication mode="Forms">
<forms path="/" loginUrl="Login.aspx"/>
</authentication>
<authorization>
<deny users="?" />
</authorization>
<sessionState mode="InProc" stateConnectionString="tcp
source=127.0.0.1;Trusted_C
and my code on the Login page button click is
Dim ticket As New FormsAuthenticationTicket(
FormsAuthentication.Redire
Any ideas how can we redirect user to a login page
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
https://www.experts-exchange.com/questions/21386152/ASP-NET-Forms-Authentication-Active-Directory.html