SQL Server with Mr. Denny

Jul 6 2009   11:00AM GMT

IIS 7 and Session State

Denny Cherry Denny Cherry Profile: Denny Cherry

While working on moving my companies data center from Texas to California we ran across an issue with IIS 7 on Windows 2008 because we were using the ASPState database to handle session state.

If you’re like me you probably upgrade when you have the chance.  If you’re like my company you don’t run just one website per server.  In our case this cluster of web servers runs 6 different sites, and the session state for one of them keeps resetting just about every page view.

Apparently one of the values which is used to create the session id is the ID number of the website in IIS.  Up through IIS 6 this number was a hash of the name of the site, so as long as the sites all had the same name you were set.  In IIS 7 this ID number is now just a running number based on the order you create the websites in.  So if you create the websites in a different order on one or more machines then your ASPState information will keep expiring since the hash values don’t match correctly.

The good news is that you can change the ID number by clicking the Advanced Settings link on the right hand side.

Denny

 Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: