0
I am trying to authenticate a page so that only people who are logged in can access a page. I am using this code.
if (Session["user"] == null)
RedirectToAction("Login", "Usuario");
But even not logged in it does not enter this if, so I understood is that my application creates a SESSION, so she’s not NULL
I did a test here and it worked. Don’t you fill out Session somewhere else? Put in the code for this Action.
– Janderson Thomaz
Only if my app does it by itself.
– user31040
Does this happen in debug? Have you tried logging in to see what’s in Session?
– Ricardo