Conditional execution of Signout

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

  1. #1

    Default Conditional execution of Signout

    Hello,

    I have a web app with a login page. It all seems to work nicely. The default page redirects to the login, the login redirects to the default(menu) page which has a signout link. If I click the signout link, the cookie is removed.

    However, if I close the browser, the cookie persists (apparently) as when I restart the app, I am taken to the main menu page without logging on.

    The authentication ticket is generated as not persistent with a timeout of 30.

    I would like to put something in the Page_Unload handler to signout if the user has not already done so, but do not want to do it at anyother time (when transferring from the main menu to an App page.) but cannot figure a safe and reliable check.

    Suggestions?

    mklapp


    mklapp Guest

  2. Similar Questions and Discussions

    1. FormsAuthentication.SignOut() problem
      Hi All, (thanks in advance for your time) I have a standard login.aspx page (UserName\Password). When the user successully sign in they are...
    2. Automaticall Signout after no activity...
      Hi I am looking for a way to ensure that an asp.net site (using forms authentication) performs a sign out automaticall after a period of time...
    3. FormsAuthentication.SignOut() not working.
      In my search to understand ASP.NET security, I went to www.asp.net and was looking at their beginner source code. Here is the link to the code that I...
    4. What is the purpose of FormsAuthentication.SignOut()?
      MSDN documentation says: Removes the authentication ticket. That's it. Where does it remove the authentication ticket from (server /...
    5. FormsAuthentication.signout does not ??
      I am using forms authentication to secure my pages. For my logout, I created a logout page with FormsAuthentication.signout is called at the...
  3. #2

    Default RE: Conditional execution of Signout

    Hello,

    Thank you for using the community. As I understand, your ASP.NET
    application use Form Authentication and non-persisted cookie. You want to
    SignOut the user once they close the IE window. Is this correct?

    Normmally, we can pust the Formsauthentication.SignOut method in
    SessionTimeOut, and use TimeOut setting of session to determine if the user
    exits the application.

    Luke
    Microsoft Online Support

    Get Secure! [url]www.microsoft.com/security[/url]
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)

    MSFT Guest

  4. #3

    Default RE: Conditional execution of Signout

    Hi Mklapp,

    Have you tried to set the cookie's Expires to DateTime.MinValue? This can
    make it a session cookie. It will expires after you close the browser.

    Regards,

    Felix Wu
    =============
    This posting is provided "AS IS" with no warranties, and confers no rights.


    --------------------
    >Thread-Topic: Conditional execution of Signout
    >thread-index: AcPqcnC/Yk88qekDTceDE0Gq1DjSxQ==
    >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security
    >From: =?Utf-8?B?bWtsYXBw?= <mklapp@zippy.com>
    >Subject: Conditional execution of Signout
    >Date: Tue, 3 Feb 2004 08:26:13 -0800
    >Lines: 15
    >Message-ID: <3D349774-77C8-4C86-9126-2289A97DC6CA@microsoft.com>
    >MIME-Version: 1.0
    >Content-Type: text/plain;
    > charset="Utf-8"
    >Content-Transfer-Encoding: 7bit
    >X-Newsreader: Microsoft CDO for Windows 2000
    >Content-Class: urn:content-classes:message
    >Importance: normal
    >Priority: normal
    >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
    >Newsgroups: microsoft.public.dotnet.framework.aspnet.security
    >Path: cpmsftngxa07.phx.gbl
    >Xref: cpmsftngxa07.phx.gbl
    microsoft.public.dotnet.framework.aspnet.security: 8509
    >NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
    >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security
    >
    >Hello,
    I have a web app with a login page. It all seems to work nicely. The
    default page redirects to the login, the login redirects to the
    default(menu) page which has a signout link. If I click the signout link,
    the cookie is removed.

    However, if I close the browser, the cookie persists (apparently) as
    when I restart the app, I am taken to the main menu page without logging on.

    The authentication ticket is generated as not persistent with a timeout
    of 30.

    I would like to put something in the Page_Unload handler to signout if
    the user has not already done so, but do not want to do it at anyother time
    (when transferring from the main menu to an App page.) but cannot figure a
    safe and reliable check.

    Suggestions?

    mklapp

    >
    Felix Wu [MSFT] 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