Users are timing out, even while they work

From: TPS (tps_at_tps.com)
Date: 02/26/04


Date: Wed, 25 Feb 2004 18:56:57 -0600

In my login routine I am doing the following

// Create the authentication ticket

FormsAuthenticationTicket authTicket = new

FormsAuthenticationTicket(1,personID.ToString(),DateTime.Now,DateTime.Now.Ad
dMinutes(60),false,roles);

//(version,name,creation,Expiration,Persistent,role data)

string x = FormsAuthentication.SlidingExpiration.ToString();

//x == true;

// Now encrypt the ticket.

string encryptedTicket = FormsAuthentication.Encrypt(authTicket);

// Create a cookie and add the encrypted ticket to the cookie as data.

HttpCookie authCookie = new
HttpCookie(FormsAuthentication.FormsCookieName,encryptedTicket);

// Add the cookie to the outgoing cookies collection.

Response.Cookies.Add(authCookie);

In my web.config file I have the following

<authentication mode="Forms">

<forms

loginUrl="/pages/login.aspx"

name="dusacookie"

timeout="60"

path="/">

</forms>

</authentication>

<sessionState

mode="InProc"

stateConnectionString="tcpip=127.0.0.1:42424"

sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"

cookieless="false"

timeout="20"

/>

Any Idea why my users are loosing their session even though they are still
working?

Thanks

TPS



Relevant Pages

  • Re: problem with slidingExpiration
    ... DateTime dt= DateTime.Now; ... //cripto l'authentication ticket ... string cookiestr = FormsAuthentication.Encrypt; ... //aggiungo il cookie ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: IsInRole problem
    ... setting up the ticket. ... What I've noticed is that the string doesn't get written to UserData in ... can't get the roles back out of the cookie. ... > the prod environment, that I get the right roles via: ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Cannot retrieve UserData in Forms Authentication
    ... and am getting user data back from the cookie. ... I assume your setting the ticket in a login page. ... >Dim authTicket As New FormsAuthenticationTicket(1, ... >Dim encryptedTicket As String = ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Non persistent cookie timeout?
    ... How do i get the cookie to time out after a period of inactivity, ... If I close the browser, the next time I use the application, it makes ... // Now encrypt the ticket. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Non persistent cookie timeout?
    ... persistent cookie, and expires only if the browser is closed. ... // Now encrypt the ticket. ...
    (microsoft.public.dotnet.framework.aspnet)