3

In my asp.net web application, I m using InProc sessionstate and forms authentication. I m setting the cookie to expire in x days on clients system using javascript. My question is if we recycle the app pool or republish the website on webserver would those cookies still work? or new cookies will be created?

The javascript which sets the cookies can be seen on http://www.knowledge.scot.nhs.uk/scripts/cookies.js and the code that sets the cookie bar

<div class="allow-cookies">
 <form method="post">
 <input type="submit" id="cookieBarAllow" value="OK" onclick="setCookie('cookie_bar_hide',  'yes', 365)">
 </form>
</div>
Bob
  • 119
  • 1
  • 2
  • 10

1 Answers1

2

I believe that new cookies will need to be created, but using Static machine keys may help with this:

http://msdn.microsoft.com/en-us/library/ff649308.aspx

This S/O question has some further detail that might help:

Forms Authentication Timeout vs Session Timeout

Community
  • 1
  • 1
Russ Clarke
  • 17,511
  • 4
  • 41
  • 45