Losing session in ASP.NET C# -
i'm having problem of losing session variable on website. append @ random times there no particular behavior cause this. can cause of session lost?
i've read everywhere on site put session in "sql server" mode written on server, can solution?
my server on 1and1 shared hosting, can fault?
thanks !
check hosting provider application not being hosted on load balanced server. if server being load balanced, users lose session state information when load balancer sends request server. there 3 settings session state mode property: inproc - store state information locally on server request made (only effective when application being hosted on single server in non-load balanced environment) stateserver - allows specially configured server host state information entire web farm (i believe stateserver began offered on .net framework v2.0). sqlserver - allows specially configured sql server instance store session information web farm [this information vary slighty in web garden scenario.]
see msdn more information on session state.
this can happen randomly based on load balancing settings (think: sticky load balancing) , can work several minutes 1 time , fail time.
the other possibility timeout property of sessionstate setting in web.config has been set low value (it in minutes) , session expiring.
Comments
Post a Comment