Timeout not working for Formauthentication

Discussion in 'ASP .Net' started by tfs, Jun 27, 2004.

  1. tfs

    tfs Guest

    I have a web program that is using formauthentication.

    My web.config file is


    <configuration>
    <appSettings>
    <add key="MM_CONNECTION_HANDLER_ServerDino"
    value="sqlserver.htm" />
    <add key="MM_CONNECTION_STRING_ServerDino"
    value="Persist Security Info=False;Data Source=Dino;Initial
    Catalog=KrystalClear;User ID=sa;Password=;" />
    <add key="MM_CONNECTION_DATABASETYPE_ServerDino"
    value="SQLServer" />
    <add key="MM_CONNECTION_SCHEMA_ServerDino"
    value="" />
    <add key="MM_CONNECTION_CATALOG_ServerDino"
    value="" />
    </appSettings>
    <system.web>
    <customErrors mode="Off" />
    <authentication mode="Forms">
    <forms name="SECAUTH" loginUrl="login.aspx"
    timeout="5">
    <credentials />
    </forms>
    </authentication>
    <authorization>
    <deny users="?" />
    </authorization>
    </system.web>
    </configuration>


    Here is the cookie that shows up in my cookies file:

    >
    > SECAUTH
    >

    83159EFF5FD04C3A8A3272D2C6151C78A65430DBE1658371985286A3783646794F635ECF099CFE328AE3CC6FFBB5A02FD715454B1B3809D149271818E24E972345362A0E5E1BF67D28044A511AA5BF59B4ECC2E3AA8CAA4D
    > 192.168.122.55/
    > 1536
    > 1961189632
    > 33319508
    > 3778607280
    > 29645820
    > *
    >


    My login page works correctly and gets redirected correctly. After
    that, when I go to my pages it doesn't go to the login page (which it
    shouldn't).

    The problem is 20 minutes later, it still doesn't go to the login page
    and the cookie is still there. I thought the timeout was supposed to
    delete the cookie after the timeout period - it doesn't.

    I did read that it doesn't work for persistant cookies. If this is
    the case, how do I make time "not persistant"?

    Thanks,

    Tom.


    Posted Via Usenet.com Premium Usenet Newsgroup Services
    ----------------------------------------------------------
    ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
    ----------------------------------------------------------
    http://www.usenet.com
    tfs, Jun 27, 2004
    #1
    1. Advertising

  2. tfs

    tfs Guest

    Figured it out.

    I need to change the 2nd parameter of
    FormsAuthentication.RedirectFromLoginPage from true to false to use
    non-persistant cookies.

    Tom


    Posted Via Usenet.com Premium Usenet Newsgroup Services
    ----------------------------------------------------------
    ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
    ----------------------------------------------------------
    http://www.usenet.com
    tfs, Jun 27, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. T-Bone
    Replies:
    1
    Views:
    339
    SparvHok
    Nov 24, 2004
  2. Pradeep Sabharwal

    Need help in FrameBased FormAuthentication

    Pradeep Sabharwal, Dec 10, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    390
    Pradeep Sabharwal
    Dec 10, 2004
  3. Jamie  Pollard
    Replies:
    4
    Views:
    5,411
    Jamie Pollard
    Jul 15, 2005
  4. Vivian
    Replies:
    1
    Views:
    378
    Tim_Mac
    Sep 8, 2006
  5. Joey Lee

    FormAuthentication on ascx files

    Joey Lee, Dec 5, 2004, in forum: ASP .Net Security
    Replies:
    3
    Views:
    144
    ranganh
    Dec 10, 2004
Loading...

Share This Page