Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Cookies are being expired after application pool is recycled

Posted on 2007-03-29
2
416 Views
Last Modified: 2013-11-07
I have an .NET 1.1 application running under an IIS 6.0.  This application makes use of  "Remember Me" option to save a persistant cookie so that the user doesn't need to login all the time.  This works completly fine and has been for many years on many differernt servers, but I just deployed this application to one client's computer and now, whenever the application pool recycles, the user's cookie isn't being used to log them in again, in essence, the cookie acts like it's expired or non-existent.  The IIS settings on this server and another server which works fine are completly the same and the web.config files are exactly the same.  I know the cookie still exists, and I can test that by closing my browser and going back to the site where I am logged back in automatically again using the cookie.  The only time that the cookie is not being accepted is if the application pool is recycled, even if I am in mid-session.  What would cause this one server to not accept valid cookies for logging in users after the session expires?  Any help is appreciated.
0
Comment
Question by:bmccleary
2 Comments
 
LVL 12

Accepted Solution

by:
craskin earned 500 total points
ID: 18820452
you need to compare the machine.config files. if you're encrypting your cookies, the keys are refreshed when the app pool recycles. my guess is your old machine had static keys for the decryption.
0
 

Author Comment

by:bmccleary
ID: 18824173
Thanks Caskin, we figured out that Windows Server 2003 SP2 was the culprit.  All the other servers were SP1.  With SP2, it causes the encryption key to be changed with each recycle.  We added a value to the web.config to make the keys static.  Thanks.
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question