| | | Forum Newbie
       
Group: Forum Members Last Login: 1/17/2009 11:05:38 AM Posts: 3, Visits: 1 |
| i have created a login page in asp.net using c# and when i open that page after validation then the url address is opened in a new browser even after i close that window by clicking sign out button. that page can be opened by just copying that url address even after i sign out.
how to stop it? serious answer please.
disney dvds
, los angeles seo |
| | | | Forum God
       
Group: Forum Members Last Login: 7/15/2011 3:57:36 PM Posts: 371, Visits: 208 |
| | You need to create a Session or ViewState variable to determine if the user is logged in or has a valid userID. You can replace Session("UserID") with ViewState but ViewState scope is limited to the life of the page, session("") is limited to life of the sign in assuming after sign out you clear the session. You could call it something like Session("UserID") = xUSERID In the page load of each page after login you write something like this: { if (Session("UserID") != null && Session("UserID") > 0) { } //load your variables do your stuff else { } //Redirect to login page } Good Luck
|
| | | | Forum Newbie
       
Group: Forum Members Last Login: 2/11/2009 5:56:27 AM Posts: 1, Visits: 2 |
| | Hi... I am using ASP.NET 2.0 (coding thru VB) with SQL SERVER 2000. I have used the given code, but still d same problem occurs & Session is not getting over.I've also used Session.Abandon() on the logout button,bt not working,I want 2 disable the navigation buttons,wen i log out the page.... Plz reply asap.... |
| | | | Forum God
       
Group: Forum Members Last Login: 7/15/2011 3:57:36 PM Posts: 371, Visits: 208 |
| Is this new window in the same domain?
Why not redirect?
How are you opening the new window? You may need to pass query string params to the new window and evaluate. Post your code and I'll take a look.
|
| | | | Forum Newbie
       
Group: Forum Members Last Login: 3/22/2009 3:17:25 AM Posts: 1, Visits: 6 |
| Read up on sessions.
Your 'signout' button is not killing your users session so when you reenter the url the browser is reading the active session and believes the users is still vaild.
if your are using the asp.net login controls make sure that you have it setup correctly
Refrigerator Filters Humidifier Filters |
| | | | Forum Newbie
       
Group: Forum Members Last Login: 4/12/2010 8:35:17 PM Posts: 1, Visits: 4 |
| I was having the same problem, but I just put in the code that TallOne suggested and it works great. It is simply a matter of having the page redirected to the login page. The sign out button will work just fine when using the redirect. However, I am having another problem, when I sign out and click the back button, it brings everything back up. I found a code that works great on IE8, but doesnt work on Mozilla. Does anyone have a code to prevent browser back button click after sign out? for Mozilla that is? Appreciate the help in advance, thanks.
RO Water Systems |
| |
|
|