473,785 Members | 2,419 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

No cookie timeout in forms authentication

Hello

I have a problem with the authentication cookie timeout in a forms
authentication.

I've developed a Web application that uses forms authentication.
My web.config is configured for the authentication cookie to expire
after 30 minutes.
The login page asks for the user's credentials and if OK, writes the
authentication cookie (through the
FormsAuthentica tion.RedirectFr omLoginPage method).

First I checked the presence of the cookie in a base page from which
all my web pages are derived --> the cookie timeout is correctly
handled (if nothing is done on the web site during 30 minutes, an
action on the web site redirects me to the login page).

Then I moved the cookie's presence verification from the base page to
the AuthenticateReq uest method (in global.asax): by doing so, the
cookie timeout didn't seem to work anymore: I can log to the web site
and let the browser running overnight, the next morning I can browse
on the site as if I had logged in 5 minutes before.

The problem seems to come from the verification done in the
AuthenticateReq uest method: has anybody an idea or can anybody help ?

Thank you very much
Nov 18 '05 #1
0 1034

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

Similar topics

2
1549
by: G-Fit | last post by:
Hello group, I use Forms Authentication in my web application and I am not sure I understand the way the cookie works. I use the SetAuthCookie method with a database identifier as userName, as I would like the website to remember who is logged in (and I guess it doesn't matter wether I store a name or an identifier, which is much more convenient for me) :
1
1811
by: Bijoy Naick | last post by:
I have a folder on my site secured with Forms Authentication. After the user is authenticated, I set a session level variable. The session time on the server is set to 20 mins. I am guessing the default expiry time for the Forms Authentication cookie is 30 mins? Is this correct? So after 20 mins, the session expires (assuming no user activity), but because the forms auth cookie is still alive, users are not redirected to the login...
0
1157
by: Michel Lapointe | last post by:
Hello, I currently have two section in my site which required authentication, to be able to have different section, I've create virtual directory for the two sections and I've try to use forms authentication with the following web.config in the root <!-- Web.Config Configuration File --> <configuration>
8
3185
by: bashful.belle | last post by:
I'm using Forms authentication and a non persistent cookie in my asp.net application. How do i get the cookie to time out after a period of inactivity, say 10 minutes, and force the user to login again? If I close the browser, the next time I use the application, it makes me log in - and That's fine. However if I keep the browser session open, it keeps my login valid for as long as the browser is open - I want it to time out. Specifying...
15
2145
by: Edwin Knoppert | last post by:
I have searched but info is limitted. In my test app i used a non persistant cookie for forms authentication. slidingExpiration is set to true On run and close and rerun the login remains ok. I have a time-out of one minute and indeed, it directs me to the login if i wait to long. The slidingExpiration does it's work also.
7
2044
by: Adam Bates | last post by:
Hello, I have a problem, I have been using Cookie Authentication on the 1.1 framework for around 3 months, when I moved the site internally within my hosting company from a server with 1.1 framework to a server with 2.0 framework I have had cookie expiring problems. Since moving to the 2.0 server, the cookies now expire within 24 hours at the most. I have checked that the cookie has a expiry date in the future, which it does (6 years...
5
2226
by: SJ | last post by:
Hi, In my website, i have a cookie that allows the user to remain logged in for upto 90days. So I'm setting the cookie expiration time to 90 days in the future from the time the user logs in. I've been testing my code and for some reason, the cookie expires randomly before even 24 hrs has passed. Yesterday it expired after 11hrs and 20mins. Any idea why my cookie expiration isn't working?
4
3846
by: GaryDean | last post by:
I'm using the 2.0 login control with the "remember me" setting. When checked the cookie only last for a few hours then it is asking again for a login. I don't see any time settings. I know back when we did our own authentication we specified FormsAuthentication.RedirectFromLoginPage(tbEmail.Text, True) and the cookie lasted forever. -- Regards, Gary Blakely
3
5174
by: jbhabion | last post by:
Hello, I am developping some webpages where our PDA-user can access some company information. Our webserver has asp.net 1.1 installed. Users can login and access the information, after a period of non- activity the session should expire and the user has to login again. I tried to do this with the following web.config. <configuration>
0
9645
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9950
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8972
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7499
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5381
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3646
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2879
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.