简体   繁体   中英

Session gets lost while debugging in visual studio 2013 web forms

since about some weeks, (I dont know exactly but I belief it started with using visual studio 2013 proffesional), my sessions get lost while debugging. I searched through the internet but did not find a working solution.

Edit: to spezify my situation. The session timeout is set in the web config. Also it happens not on every debug session. Sometimes i try to loose the session and cannot force it. other time the session is lost within the first try.

I observed the session variables. And the session not randomly lost between two postbacks.

The situation:

  1. Click Button and doing a function wich stores 5 session variables.
  2. At the end of the function I checked and the variables still there.
  3. Click another Button with another function. check the variables. Not there anymore.

the pageload is empty, so it cannot change the session variables. And so no code does it.

Anyone can help?

Try to set cookieless="true" in sessionState node in Web.config. This however will move sessionID into the URL (not very handy). Do it only for develop version because on production/test server session should works ok.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM