If user login with the login control in ASP.Net 2005 and then just close the
browser and then open the browser again, the login status shows, User still
Login?
Any idea, how to Logout the User when the User click on the Close Button of
Browser ?
I am using Sql Membership Provider for security.
Best Regards,
Luqman 20 3161
A lot of times, the short-term cookie, such as the login cookie, can get
stored in IE's cache even after you close the browser. There is absolutely
no way that you can do anything when the user closes out the browser. The
thing to keep in mind here, once the browser fully loads the web page and
it's graphics, it is completely disconnected from the web server. There is
no notification that occurs when a browser is closed (or when a user browses
away from a web site) so there isn't a way to handle this type of event and
destroy the cookie.
--
Hope this helps,
Mark Fitzpatrick
Microsoft FrontPage MVP 199?-2006. 2007 and beyond
"luqman" <pe*******@cybe r.net.pkwrote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
If user login with the login control in ASP.Net 2005 and then just close
the
browser and then open the browser again, the login status shows, User
still
Login?
Any idea, how to Logout the User when the User click on the Close Button
of
Browser ?
I am using Sql Membership Provider for security.
Best Regards,
Luqman
Are you sure you're not just talking about closing a tab? If you're talking
about closing the browser, it's very worrying and would need investigating.
As I understand it, login cookies are linked to a session id. Session Ids
are generated by the browser, so when the browser is closed, the session id
is lost. When the browser re-opens, a new session id is generated that
would not tie in with the cookie for the previous session, which will simply
die at the end of its timeout period. So you should not still be shown as
logged in when you return to the login page, or other page within the
application.
With tabs, on the other hand, the session is not lost when a tab is closed
and you will still be marked as logged in if you return to your
application - at least until the session times out.
HTH
Peter
"luqman" <pe*******@cybe r.net.pkwrote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
If user login with the login control in ASP.Net 2005 and then just close
the
browser and then open the browser again, the login status shows, User
still
Login?
Any idea, how to Logout the User when the User click on the Close Button
of
Browser ?
I am using Sql Membership Provider for security.
Best Regards,
Luqman
"Mark Fitzpatrick"
There is no notification that occurs when a browser is closed (or when a
user browses away from a web site) so there isn't a way to handle this
type of event and destroy the cookie.
onunload
onbeforeunload
:) ??
re:
!onunload
!onbeforeunload
Those don't fire server-side, only client-side.
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== ========
"Just D." <no@spam.please wrote in message news:e6******** ******@TK2MSFTN GP03.phx.gbl...
"Mark Fitzpatrick"
>There is no notification that occurs when a browser is closed (or when a user browses away from a web site) so there isn't a way to handle this type of event and destroy the cookie.
onunload
onbeforeunload
:) ??
"Just D." <no@spam.please wrote in message
news:e6******** ******@TK2MSFTN GP03.phx.gbl...
>There is no notification that occurs when a browser is closed (or when a user browses away from a web site) so there isn't a way to handle this type of event and destroy the cookie.
onunload
onbeforeunload
You're not serious, surely...
--
Mark Rae
ASP.NET MVP http://www.markrae.net
Hi Luqman,
I've never run into this problem before.
When you're testing, make sure you close all of the browser windows; I
think that the temporary cookies don't get cleared out until all of
the browser instances are terminated.
Another approach to this problem it to make sure that your default
page is the main landing page of your application; .NET security will
redirect the user to the login page if they aren't logged in anyway,
so making the login screen the site's default.aspx is a bit redundant.
That way, if they are still logged in when they return to the site,
the user isn't presented with a login prompt while their status (say,
in the master page) reports otherwise.
POOF!!! Suddenly your bug became a feature... :-]
Good Luck.
-Mark
"Mark Rae [MVP]"
>>There is no notification that occurs when a browser is closed (or when a user browses away from a web site) so there isn't a way to handle this type of event and destroy the cookie.
onunload onbeforeunlo ad
You're not serious, surely...
Well, yes and no. Theoretically we can write some method conecting to the
server and making required steps. For example we can add one more page to
the app and redirect to this page if the user confirms that he wants to
close the session or the browser. This page will correctly close the session
letting the server know about that. It will be some kind of "Thanks" page.
If there is any other event like control click, then this method can be
easily disabled using on-page flag to avoid firing it on each page refresh.
Also we can analyze the new URL in JS and if the user leaves the app URL and
goes to new URL we can call the "Thanks" page as a popup, make all required
steps using this page and then just close it without any questions asked.
Since it was opened by the app it can be closed by the same app without
restrictions. How about that? Just an idea...
I'm managing the sessions in a different way, but I can't disclose this
method here, sorry.
Just D.
"Just D." <no@spam.please wrote in message
news:%2******** *******@TK2MSFT NGP06.phx.gbl.. .
I'm managing the sessions in a different way, but I can't disclose this
method here, sorry.
LOL!
--
Mark Rae
ASP.NET MVP http://www.markrae.net
"Mark Rae [MVP]"
>I'm managing the sessions in a different way, but I can't disclose this method here, sorry.
LOL!
It would be very funny if it didn't work for already several years without
any issues for over 500 sessions every morning. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Tom Loach |
last post by:
Our system administrator set up an NT server group in order to allow
our users to login to our application via https to our sql server.
The group appears as a User in SQL Server when you look at it in
Enterprise Manager. That said, I can not see the users associated
with the group from Enterprise Manager, but know they can login to the
database.
The problem is this. When we login via the web we get access to the
database without...
|
by: Michelle Stone |
last post by:
Hi everybody
I am writing a simple asp.net application using form
authentication. I store the list of all users and their
passwords in an SQL Server database table.
My client recently told me that he wants me to do
something through which only one user can login using any
given account name. I mean to say, for example, when a
user called "abc" is online, another person shouldn't be
|
by: Bob |
last post by:
I haver a user login form (winforms app using vs2005 in VB.NET). After
succesfull validayion of user I want to open a first form and close the
loging form that was used, If I write
If IsValidatedUser(UsernameTextBox.Text, PasswordTextBox.Text) Then
frmCompanySelect.Show()
End If
|
by: luqman |
last post by:
If user login with the login control in ASP.Net 2005 and then just close the
browser and then open the browser again, the login status shows, User still
Login?
Any idea, how to Logout the User when the User click on the Close Button of
Browser ?
Best Regards,
Luqman
|
by: JodiPhillips |
last post by:
G'day,
I have a silly and simple problem that I need some guidance with.
Due to the way our network is set up, I am unable to use the group permissions for Access and have had to implement log in procedures via a log in table within the database. This works fine. I have now expanded this table to include further data about the authorised user – Power User, Team Leader, & Facilitator.
Depending on the user’s status as to which one of...
| |
by: satishknight |
last post by:
Hi,
Can some one tell me how to change the validation sequence for the code pasted below, actually what I want it when any one enters the wrong login information (already registered users) then it has to tell then them its wrong information but currently it takes then to a next page and then tells them its incorrect information. This is tedious as every time they enter wrong they will be redirected to a different page and then they have to...
|
by: Gordon |
last post by:
I want to add a feature to a project I'm working on where i have
multiple users set up on my Postgres database with varying levels of
access. At the bare minimum there will be a login user who only has
read access to the users table so that users can log in. Once a user
has been logged in successfully I want to escalate that user's access
level to one appropriate to their role, which will include switching
the postgres user they are...
|
by: jerrydigital |
last post by:
Hello,
I have an edit user page that allows the user to view their user information and make changes if possible. I have a simple html login page that directs to an asp page called edituser.asp when they login. Here is the edituser.asp code I have
<%@ Language=VBScript %>
<% Option Explicit %>
<!--#include virtual="/adovbs.inc"-->
<html>
<body>
<%
|
by: jerrydigital |
last post by:
Hello, I am having trouble getting unique user information on my account page. Currently, once the user logs in, it will only display "Welcome...(then the same name pops up no matter who logs in)".
After the login.html page, the form redirects the user to the loggedin.asp page which verifies the users email and password are in the database. Here's the loggedin.asp code:
loggedin.asp:
<%@ Language=VBScript %>
<% Option Explicit %>...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |