Solved

Cookies are being expired after application pool is recycled

Posted on 2007-03-29
2
419 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
[X]
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
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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand column That will then direct you to their download page. From that p…
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 use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

729 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