I try to setup a E-shop. Next to every item I\'ve an asp:imagebutton
when this imagebutton is clicked I\'m checking whehter the session varialbe session[\"bas
Sounds like your appdomain is being recycled. Is your web.config
compilation
element set in debug
mode? In debug mode, ASP.NET resets the appdomain every 15 dynamic compilations. When that happens, if your sessions are stored in memory (InProc
mode - the default), they'll be lost.
FYI, a dynamic compilation will occur whenever a file change happens on your site, like you editing an ASPX file, or an image being generated, or a web.config change.
So either put the site into Release mode (
), or increase the numRecompilesBeforeAppRestart
value from 15 in web.config
, or use a non-volatile session storage mode - e.g. SQL Session State.