I\'m setting up a very basic demo of SQL Server Session State, but am having some trouble getting it working. I\'m trying to test this out locally running Windows 7 with IIS
The problem you have is sharing session state across ASP.NET applications. This is not supported out-of-the-box with SQL Server session provider. See this SO post regarding what changes to make to SQL Server session provider to support cross-application sessions.
I would not use session for managing this shared state (i.e. LastSiteUsed
). This information should be persisted with the user profile store (Membership, Profile provider, custom DB, etc.). Since session can expire - using a shared session across applications isn't a reliable mechanism to track persistent user-specific state. If persistence isn't critical than utilize the AppFabric Cache for an in-memory cross-application shared state.