473,403 Members | 2,071 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,403 software developers and data experts.

Problem with Forms Authentication Cookie & Server 2003

Something strange is happening on my web site since my hosting provider
upgraded to Server 2003 a few weeks ago.

I use forms authentication in my asp.net application, with essentially
the following c# code-behind on my login page:

If (FormsAuthentication.Authenticate(UserName.Text, UserPass.Text))
FormsAuthentication.RedirectFromLoginPage(UserName .Text, true);

Note that the createPersistentCookie parameter is set to true.

In addition, my web.config has the following authentication section:

<authentication mode="Forms">
<forms loginUrl="login.aspx" name="LOGINCOOKIE" path="/"
protection="All" requireSSL="true" timeout="43200"/>
</authentication>

(The timeout above is in minutes -- 43200 minutes works out to 30 days
by my calculations.)

Prior to the Server 2003 upgrade, I could log in to my web site once
and the cookie would last for somewhere around 30 to 45 days.

But ever since the upgrade to Server 2003, I get prompted to log in
very erratically -- sometimes once a day, sometimes several times a day
and sometimes once every few days. I've verified that the LOGINCOOKIE
is being passed in the request, so it's not being deleted from my
browser.

Any ideas what's going on here? Seems to me that there's a problem with
the persistent nature of the cookie, or (more likely) some special
setting in IIS isn't configured properly under Server 2003. I see that
there's a slidingExpiration parameter that can be added to the <forms>
tag but I don't want to use that - I want the app to make me log in
once every 30 days or so.

Thanks for any pointers you can offer!

-Marty
gg**@pobox.com

Nov 19 '05 #1
2 1462
Sounds like the clock is off somewhere -- either your machine or the server.

-Brock
DevelopMentor
http://staff.develop.com/ballen
Something strange is happening on my web site since my hosting
provider upgraded to Server 2003 a few weeks ago.

I use forms authentication in my asp.net application, with essentially
the following c# code-behind on my login page:

If (FormsAuthentication.Authenticate(UserName.Text, UserPass.Text))
FormsAuthentication.RedirectFromLoginPage(UserName .Text, true);
Note that the createPersistentCookie parameter is set to true.

In addition, my web.config has the following authentication section:

<authentication mode="Forms">
<forms loginUrl="login.aspx" name="LOGINCOOKIE" path="/"
protection="All" requireSSL="true" timeout="43200"/>
</authentication>
(The timeout above is in minutes -- 43200 minutes works out to 30 days
by my calculations.)

Prior to the Server 2003 upgrade, I could log in to my web site once
and the cookie would last for somewhere around 30 to 45 days.

But ever since the upgrade to Server 2003, I get prompted to log in
very erratically -- sometimes once a day, sometimes several times a
day and sometimes once every few days. I've verified that the
LOGINCOOKIE is being passed in the request, so it's not being deleted
from my browser.

Any ideas what's going on here? Seems to me that there's a problem
with the persistent nature of the cookie, or (more likely) some
special setting in IIS isn't configured properly under Server 2003. I
see that there's a slidingExpiration parameter that can be added to
the <forms> tag but I don't want to use that - I want the app to make
me log in once every 30 days or so.

Thanks for any pointers you can offer!

-Marty
gg**@pobox.com


Nov 19 '05 #2
No, it's not the clock. If it was, things would happen consistently.

Appreciate any other ideas. And I'm surprised that nobody else has
noticed this to be a problem...

Nov 19 '05 #3

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

Similar topics

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...
1
by: Scott | last post by:
Hi, We're having an issue with Forms Authentication cookies being treated as expired / invalid, and being deleted. This is causing our intranet users a great deal of pain - Running IIS 5.0 on...
3
by: Kris van der Mast | last post by:
Hi, I've created a little site for my sports club. In the root folder there are pages that are viewable by every anonymous user but at a certain subfolder my administration pages should be...
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...
3
by: Mike | last post by:
I have a web application that the forms authentication cookie is not expiring correctly. When I look at the trace information of a newly requested page after the session and forms authentication have...
7
by: mircu | last post by:
Hi, I noticed weird behaviour with the site that is using forms authentication. I am logged to the site from the same machine from two browsers (opened separately, not ctrl-N) as different users...
2
by: Randall Parker | last post by:
Some questions on forms authentication: 1) Can one do one's own checking of username and password and totally bypass calling FormsAuthentication.Authenticate? 2) does the "new...
1
by: Steven M. | last post by:
Greetings... I need desperate help with my problem. I guess the solution is related in some way with the cookies getting lost in the authentication process working with some web servers. ...
1
by: Mark Olbert | last post by:
I'm building an ASPNET2 website which uses forms authentication but does not use the Microsoft-supplied membership providers (mostly because I don't want to create my own provider at this point, and...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
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...

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.