c# - How to end the user session and make sure that the user is logged out? -
I am new to .aspx and now it is a matter of fact that since I am projecting a web enabled This is the login user. I drag the login template down and then
is used for the session ["Authentication"] = Username. Thasting ();
The current log in information to store the user and so now I also used the hyperlink "logout" in the upper right corner and then moved it to the login page. (If this is the wrong way to move wrongly, then tell me, I am learning all over the internet).
Now, if I run on the Web, I can easily enter, but when I will take the "hyper link" "logout" to me again on the login page, but if I re-press the back button of the browser then that data transfers control over the page and I can again perform the data operation.
I used it on the page load of the login page
session ["authenticated"] = zero
so that only the login button Users can login again by clicking
Session ["Authentication"] = Username Thorring ();
Then I used an experiment on every page load of the data pages
if (session [Authentiacte]] == faucet server. Tranfer ("LoginPage.aspx");
This does not solve my problem, can anyone please provide an indication or a link or a tip to improve the path of my logout? I project this Stratted without any knowledge of NAT or aspx and I'm still learning Ything, please thank my doubts in advance.
http consoles. Current session (); HttpContext.Current.Session.Abandon (); HttpContext.Current.User = null; System.Web.Security.FormsAuthentication.SignOut (); // If Form Aeth is used then
Comments
Post a Comment