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

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -