473,405 Members | 2,262 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Forms timeout doesn't appear to be working.

Folks,
This is sort of a continuation of my question with session timeouts but
slightly different.

I am using Forms authentication with the following code:

FormsAuthenticationTicket lTicket = new
FormsAuthenticationTicket(lsUserID, true, 6000);
// Hash the cookie for transport
string lHash = FormsAuthentication.Encrypt(lTicket);
System.Web.HttpCookie lCookie = new
System.Web.HttpCookie(FormsAuthentication.FormsCoo kieName, lHash); // Hashed
ticket
// Add the cookie to the list for outgoing response
Response.Cookies.Add(lCookie);

Response.Redirect("~/RM/LoginCustomer.aspx");

I realize the length on the ticket is really REALLY long but at the moment I
want it that way. The problem is, it appears as if the ticket is timing out
after 30 minutes. My session timeout is set using the following code in
web.config:

<sessionState cookieless="false" timeout="480"/>

I realize the timeouts are different but I'm just trying to get it to work.

Is there anything else I need to do to make this work? It seems like it
shouldn't time out but is.

I already have code that says if my login ID, which is stored in the session
is gone, redirect to the login page. But I don't want it to disappear in the
first place. This happens after 30 minutes.

I can't tell for sure whether it's because the session has timed out or the
form ticket has. I have a feeling it's the session timeout because if I take
out the check for the user ID, I get Object Not Defined when I try and
access Session variables.

TIA - Jeff.
Jun 27 '08 #1
1 1627
session tickets and authentication tickets are unrelated to each other. if
you are using inproc sessions you need to worry about recycle events. a
recycle will cause a loss of session. a recycle can be caused by too much
memeory use, idle timeout (20 minutes default), file changes, etc).

if you are the only user, then the idle recycle is probably causing the
recycle.

-- bruce (sqlwork.com)
"Mufasa" wrote:
Folks,
This is sort of a continuation of my question with session timeouts but
slightly different.

I am using Forms authentication with the following code:

FormsAuthenticationTicket lTicket = new
FormsAuthenticationTicket(lsUserID, true, 6000);
// Hash the cookie for transport
string lHash = FormsAuthentication.Encrypt(lTicket);
System.Web.HttpCookie lCookie = new
System.Web.HttpCookie(FormsAuthentication.FormsCoo kieName, lHash); // Hashed
ticket
// Add the cookie to the list for outgoing response
Response.Cookies.Add(lCookie);

Response.Redirect("~/RM/LoginCustomer.aspx");

I realize the length on the ticket is really REALLY long but at the moment I
want it that way. The problem is, it appears as if the ticket is timing out
after 30 minutes. My session timeout is set using the following code in
web.config:

<sessionState cookieless="false" timeout="480"/>

I realize the timeouts are different but I'm just trying to get it to work.

Is there anything else I need to do to make this work? It seems like it
shouldn't time out but is.

I already have code that says if my login ID, which is stored in the session
is gone, redirect to the login page. But I don't want it to disappear in the
first place. This happens after 30 minutes.

I can't tell for sure whether it's because the session has timed out or the
form ticket has. I have a feeling it's the session timeout because if I take
out the check for the user ID, I get Object Not Defined when I try and
access Session variables.

TIA - Jeff.
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mark MacRae | last post by:
I am trying to do some testing of my application with respect to timeouts (i.e. Session timeouts). I took the advice of somebody else in this newsgroup (I think) and set my forms authentication...
11
by: ElmoWatson | last post by:
I tried on the Security newgroup, as well as other places, and haven't gotten an answer yet - - I'm pulling my hair out over this one. I'm trying to get Forms Authentication working.....I can get...
2
by: Kian Goh | last post by:
Hi there, I am trying to use an entry level security for my resources website. I followed the procedures in the MS published Self-Paced Training Kit, everything seems working as expected....
3
by: john | last post by:
I have 2 questions: 1. I am trying to use forms authentication. When the user logs out, I make these function calls: Session.Abandon(); FormsAuthentication.SignOut(); But after they log out,...
0
by: Anonieko Ramos | last post by:
ASP.NET Forms Authentication Best Practices Dr. Dobb's Journal February 2004 Protecting user information is critical By Douglas Reilly Douglas is the author of Designing Microsoft ASP.NET...
1
by: AVance | last post by:
Hi, I've come across this scenario in ASP.NET 1.1 with forms authentication where the forms auth doesn't seem to timeout correctly, nor redirect to the login page. I have done some testing, and...
8
by: Joe Abou Jaoude | last post by:
hi, I have a web app with forms authentication and a timeout session of 20 mins for security reasons. I recently added a feature that allows users (if they want to) to automatically log in...
3
by: Andrew Robinson | last post by:
Is there any way to dynamically set the timeout while using forms based authentication? I want to change this value depending on the type of user that logs into my system. I understand that this...
0
by: Morgan Cheng | last post by:
In the doc http://msdn2.microsoft.com/en-us/library/system.net.httpwebrequest.timeout.aspx, it reads, "A Domain Name System (DNS) query may take up to 15 seconds to return or time out. If your...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.