View Full Version : .net secured web app

12-22-2003, 10:44 AM
I want to maintain session for a particular section or folder for 20 mins or till the browser close whichever is earlier. after that after that if user type that url it should go to login page.
My code (web.config) is mentioned below which is working only in case if I press logout button, where i am doing FormsAuthentication.SignOut();

What is the way to solve this problem?

<authentication mode="Forms">
<forms loginUrl="login/login.aspx" name="CookieName" path="/" timeout="20" >



<location path="foldername" >
<deny users="?" />

12-22-2003, 02:38 PM
Microsoft is really bad at sessions and I do not rely on their code when I am working on my applications, but I persoannly have my own way of doing it since I can never have it fail. I keep track with databases but that is not what you are asking.

There is a nice article on msdn site on session...


Basically you need to look into Session_OnEnd.


12-30-2003, 06:11 AM
Alien is right, as far as I know they haven't really improved on their session handling much with regards to the global.asa...

If I'm wrong then someone please point out how, as I haven't had time to mess with this aspect of .NET. !

12-30-2003, 02:17 PM

I forget where it is, but on MSDN it said do not rely on it.....
I almost fell out of my chair when my partner showed me it.