c# - Expired session on a website using callbacks -


i have aspx.cs page use callback connect server side.

after website starts running, if work on page several minutes, session has been expired. have used callback , haven't used postback. think session has expired because it's not arising postback, web site callback based , never use postback.

how can resolve expired session problem?

by callback assume mean ajax calls page. these normal http calls , carry browser session cookie normal postback. therefore session should stay alive.

however, in debug mode appdomain recycle after 15 dynamic compiles, , if using inproc session state, session lost.

you can increase number of compiles before appdomain recycle using <compilation numrecompilesbeforeapprestart="1000" /> element in web.config.

i recommend use sqlserver mode session state, sql-stored sessions survive appdomain recycles / server reboots / load-balanced server switching etc.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -