T
TPS
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
// 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