Click here to Skip to main content
15,906,265 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to add some facility in my website in which if the user is idle for 1 minutes it will be redirect to the login page. so for this i added one iine in web.config file but not works..

XML
<appSettings>
       <add key ="sessionTimeout" value ="10"></add>
</appSettings>


so, if there is the problem so please tell me.

Thanks....
Mitesh
Posted
Comments
deeptibansal 15-May-12 6:09am    
You provided the value 10 which makes it 10 minutes....make it 1 then try.
[no name] 15-May-12 6:23am    
sorry but value=1.

1 solution

<system.web>
    <authentication mode="Forms">
          <forms timeout="50"/>
    </authentication>

    <sessionstate timeout="60" />
</system.web>


<authentication mode="Forms">
		<forms loginUrl="Default.aspx" protection="All" timeout="60" name="" path="/" requireSSL="false" slidingExpiration="true" defaultUrl="Home/Default.aspx" cookieless="UseDeviceProfile" enableCrossAppRedirects="false">
				</forms>
		</authentication>


try this link
 
Share this answer
 
v3
Comments
Code 89 15-May-12 7:41am    
Thanks!
[no name] 15-May-12 8:45am    
by using your code it will be redirect after some minutes which i have set in it. but i want to do like if the user is idel so only that time it will be redirect to the login page. from your code it must redirect the login page even if the user can work.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900