Click here to Skip to main content
15,861,172 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
So I have this code on my page:
VB
FormsAuthentication.SetAuthCookie(UsernameTxt.Text, False)


And this in Webconfig:
HTML
<authentication mode="Forms">
        <forms loginUrl="~\login.aspx" timeout="60"></forms>
</authentication>


I know the timeout in the Webconfig is for the idle time.
How do i set the "timeout" of a form for not idle?

Thanks in advance.
Posted
Comments
manognya kota 15-Feb-12 2:29am    
Why do you want to do that?Will that not cause losing some data or work?

I haven't tried it, but you could set it to zero? In many systems this would give "no timeout" - but I think you would have to test it against each of the browsers to make sure they all work the same...
 
Share this answer
 
Hmmm perhaps there has been a misunderstanding.
I still want to have the timeout for idle.
But I still need to set the time which the system will automatically log out when you have used it in a reasonable amount of time, even if you are not idle and still using it.
Any ideas?
 
Share this answer
 
Use Timer. Timer is used to exit page or navigate the page when the time expried. You can set the time as you want. Refer some article about timer in vb.net.
 
Share this answer
 

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