Click here to Skip to main content
15,879,095 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
what the Reason that our session is going to expire when we edit Web.config file

What I have tried:

If i Edit Connection String or Session time,it automatically gets Expired.
Posted
Updated 11-May-16 1:02am

1 solution

Changing the web.config will recycle your entire application causing all sessions to be destroyed, and causing the site to take a while to start up again after the next request. You shouldn't be changing the web.config anyway, if you are changing connection strings then your site probably isn't even working so why do you care that sessions are expired? If you're changing the web.config as part of your code architecture then that is a very bad idea indeed.

Sessions stored using the State Server will survive a web.config update but as above, if updating the web.config is a problem for you then there is something very wrong with your architecture.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900