c# - Cookies logout razor remove -


i have asp application , need remove current session's cookies in action of logout:

 public actionresult logout()         {             upload.models.comptemodels.connected = false;             return redirecttoaction("login", "account");          } 

now use static class comptemodels boolean test if user authentifying or not it's not efficent. think have remove cookies when logout.

how can it?

a static property shared across users, using static property determine if user logged in not work correctly, log out users, or log them in.

you can abandon session using session.abandon or remove cookie using httpresponse.cookies collection, , write cookie expired.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -