Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Posts
    156
    Thanks
    0
    Thanked 0 Times in 0 Posts

    .net secured web app

    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" >

    </forms>
    </authentication>

    <sessionState
    cookieless="false"
    />

    <location path="foldername" >
    <system.web>
    <authorization>
    <deny users="?" />
    </authorization>
    </system.web>
    </location>
    Last edited by ebco; 12-22-2003 at 09:47 AM.

  • #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    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...

    http://msdn.microsoft.com/library/de...ssionstate.asp

    Basically you need to look into Session_OnEnd.

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    41 8' 52" N -95 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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. !
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)

  • #4
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    Whammy,

    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.

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •