I think you should define the session state mode
There are there different session states in ASP.NET
http://msdn.microsoft.com/en-us/library/ms178586(v=VS.80).aspx
In-Process Mode
The defaul one is <sessionState mode="InProc" timeout="10" />, the session will be clear after rebuild the project
State Server Mode
we can use this, but remember to turn the services - ASP.NET State Service
<sessionState mode="StateServer"
stateConnectionString="tcpip=localhost:42424"
sqlConnectionString="data source=.\SQLEXPRESS; User ID=sa;Password=12345678; Integrated Security=SSPI"
cookieless="false"
timeout="2"
/>
SQL Server Mode we can use this after create a DB ASPSate by command, pls check this site for details - http://www.brianstevenson.com/blog/aspstate-concurrently-running-for-net-1011-and-net-20
<sessionState mode="SQLServer"
stateConnectionString="tcpip=localhost:63586"
sqlConnectionString="data source=.\SQLEXPRESS; User ID=sa;Password=12345678; Integrated Security=SSPI"
cookieless="false"
timeout="2"
/>
The session in State Server Mode & SQL Server Mode will not be cleared after rebuild the project, it's good for development