IIS 7 and Session State

Published On: 2009-07-06By:

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


Contact the Author | Contact DCAC

Video

Globally Recognized Expertise

As Microsoft MVP’s and Partners as well as VMware experts, we are summoned by companies all over the world to fine-tune and problem-solve the most difficult architecture, infrastructure and network challenges.

And sometimes we’re asked to share what we did, at events like Microsoft’s PASS Summit 2015.

Awards & Certifications

Microsoft Partner       Insights Sccess Award    Technology Headlines Award    Golden Bridge Gold Award    CIO Review Top 20 Azure Solutions Providers    VMWare Partner
Microsoft Certified Master    Microsoft MVP
Share via