I made a login page and it's working and now i want to set logout status
i'm doing but not success till now .............
please help me..............Thanks a lot of you.........
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jimmy NamgailPosted Sep 29, 2013, 2:56 AM
Anuja PawarPosted Jan 24, 2012, 6:10 AM
How to make secure web application
Demonstration:-
onclick="lnk_Click" CausesValidation="false">
Step2-> Now remove the session from cache, To do it, write the following code in page_load event of your master page in which you have logout button.
Demonstration:-
protected void Page_Load(object sender, EventArgs e)
{
Response.Cache.
}
Step3-> Now write the following code in click event of link button
Demonstration:-
protected void lnk_Click(object sender, EventArgs e)
{
Session.Abandon();
Response.Redirect("~/Home.
}
After performing all these steps your logout button will perform fine,
If you want to make more secure of your web application then you need to add Global.asax file in your web application. We define an event in this file that will perform globally and provide security from intruders.
Step1-> *Right click on your web application .
*Add new item.
*Add Global.asax file.
Step2-> Write a function in your Global.asax file as mention below.
void session_start()
{
if (Session["usr"] == null)
{
Response.Redirect("~/Home.
//Here you can write the address of your home page or index page
// Or which you want to make start page.
}
}
Now your web application is secure. If any one paste the url of any page of your web application in the browser but browser will show only home or index page of your web application insteade of appropriate page. This is because your Global.asax file that works globally.
Krishna GaradPosted Jan 23, 2012, 5:49 AM
[ Log In ]
Welcome
[
and in masterpage.cs page create event called Logged_out where you can write the code to log out the user.
Satyapriya NayakPosted Jan 23, 2012, 3:47 AM
Please refer the below links
http://www.codeproject.com/Articles/210993/Session-Fixation-vulnerability-in-ASP-NET
http://www.codeproject.com/Tips/135121/Browser-back-button-issue-after-logout.aspx
Thanks