Windows Authentication and Session State

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Windows Authentication and Session State

    I have an ASP.NET application that is using windows authentication (basic).
    It prompts the user for their Windows Credentials when they first load the
    page.

    Now, I want to have the "session" timeout in 3 minutes, so that the page
    will again prompt them for their credentials if this timeout has elapsed.

    I have tried setting the "Session.timeout = 3" in the page_load method of
    the page I want to secure.

    I notice that the "Session_End" method in Global.Asax does fire, but the
    Authentication Ticket appears to "stay valid" even after the Session has
    ended.

    Is there a way to force the page to prompt again for Windows Credentials at
    specified timeouts?

    Please let me know.

    Thanks.

    -- Will Gillen


    Will Gillen Guest

  2. Similar Questions and Discussions

    1. #39250 [NEW]: Session problem on PHP using authentication on Windows 2003 IIS 6.0
      From: gutosantos82 at gmail dot com Operating system: Windows 2003 PHP version: 5.1.6 PHP Bug Type: IIS related Bug...
    2. Session state IIS (Machine Key | Load Balanced Session)
      This is a classic ASP group. Try microsoft.public.dotnet.framework.aspnet "Fred" <me@me.com> wrote in message...
    3. Windows re-authentication in ASP.NET using C# after session timeout
      Good day, We have developed an intranet site for one of our clients. We are using Windows Authentication successfully. Our problem lies in the...
    4. User Session issue with ASP.NET Forms authentication & Windows 2003
      Hi, I first posted this query in just the aspnet ng but didn't get a reply so I'm posting here (probably more appropriate) Hope one of you guys...
    5. Forms Authentication with Session State
      Hey All. Currently, I have a login page that creates an encrypted Authentication Cookie (using FormsAuthenticationTicket). This happens after...
  3. #2

    Default Re: Windows Authentication and Session State

    I'm new to .NET, but hopefully you can use this...

    I've included the following code in global.asax:

    protected void Session_End(Object sender, EventArgs e)
    {
    if (User.Identity.IsAuthenticated)
    {
    // User is still authenticated
    FormsAuthentication.SignOut();
    }
    }

    This makes the Authentication Ticket invalid.

    Nico


    Nico den Boer Guest

  4. #3

    Default Re: Windows Authentication and Session State

    "FormsAuthentication.SignOut();" doesn't appear to work on "Windows
    Integrated" Authentication.

    My application is using "Windows Integrated" Authentication, and not Forms
    based authentication. This means that IIS is handling the authentication
    and creating an identity. M question is: how can I "un-authenticate" the
    identity at a specified time interval (without having to have the users
    close all their browser windows)?

    This approach that you provided is in the direction that I'm looking for,
    but when i tried to implement, it didn't seem to work with "Windows
    Integrated" Authentication.

    Any other ideas?

    -- Will G.


    "Nico den Boer" <nicodenboer@home.nl> wrote in message
    news:eVqbqUjxEHA.1392@tk2msftngp13.phx.gbl...
    > I'm new to .NET, but hopefully you can use this...
    >
    > I've included the following code in global.asax:
    >
    > protected void Session_End(Object sender, EventArgs e)
    > {
    > if (User.Identity.IsAuthenticated)
    > {
    > // User is still authenticated
    > FormsAuthentication.SignOut();
    > }
    > }
    >
    > This makes the Authentication Ticket invalid.
    >
    > Nico
    >
    >

    Will Gillen Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139