473,698 Members | 2,556 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Verifying the user is connected

Hi.

My site needs to know if the user is connected before executing some
queries on my database. Actually, I have a page loaded by an Iframe
that runs every 30 seconds and updates a field on my database to tells
me the user is connected. If this field is not updated for more than
one minute I consider the user disconnected.

The problem is, if that page does not load for any anormal reason (an
IIS error like Page Could not be Loaded, for example), my database
won't be updated, but the user is connected!

What is the best way to detect a user is connected on your site? I read
about an element on the Machine.config file called
clientConnected Check. Can it be used for that kind of verification?

Thanks,
Robert Scheer

Nov 19 '05 #1
2 2312
Robert,

Technically, after each page is delivered to the client the user is no
longer connected to your website.

That is why session state was invented. Session state is simply a timer that
gets reset every time a user connects to the server. How does the server
know which user is currently connecting? The first time a "new" user
connects to the server and begins a new session a cookie is stored on the
server.

I would suggest that you use the user session to check if a user is still
connected and set it for longer than a single connection to your iFrame
refresh. So if your iFrame refreshes once a minute and you want to give a
user up to three tries to connect set your session timeout to three minutes
and twenty seconds or something similar to that logic.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Robert Scheer" <rb******@my-deja.com> wrote in message
news:11******** **************@ g47g2000cwa.goo glegroups.com.. .
Hi.

My site needs to know if the user is connected before executing some
queries on my database. Actually, I have a page loaded by an Iframe
that runs every 30 seconds and updates a field on my database to tells
me the user is connected. If this field is not updated for more than
one minute I consider the user disconnected.

The problem is, if that page does not load for any anormal reason (an
IIS error like Page Could not be Loaded, for example), my database
won't be updated, but the user is connected!

What is the best way to detect a user is connected on your site? I read
about an element on the Machine.config file called
clientConnected Check. Can it be used for that kind of verification?

Thanks,
Robert Scheer

Nov 19 '05 #2
probabaly this is what you are looking for ?

HttpResponse.Is ClientConnected

I havnt tired this.. just remebered the property name and looked up in
MSDN

http://msdn.microsoft.com/library/de...ectedTopic.asp

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
3562
by: Chris Sharman | last post by:
I'm doing a rough validation of an email address client-side (using js), but it's not enough - our customer service people are apparently incapable of typing in an email address without error - we get spaces, missing '@', multiple '@' which we can field, and simple mis-spellings, which we can't. I'd like to automate a 'mailto:' popup for them on submit, along the lines of "thanks for your email address, just verifying I've got it right"....
4
1566
by: HD | last post by:
Hi, I was wondering if there is a way of verifying information that is in the registry of the user's computer??? Or is there a way of checking if a file is on the c:\ of the user's computer?? I want to make a certain verification of who is entering my website... but the IP address is never the same (since it is randomly given to the user) and I can't use the LOGON_USER variable because the users are not all in the same domain. And...
1
1158
by: Stephanie | last post by:
Is there a way that SQL can automatically look at each users' connection and make sure it is still connected through the third party application? The problem is that when a connection to this application is not terminated properly, the SQL server is not notified of the disconnect and the user cannot log back into the application until all the processes are completed and the original session terminated. Thank you.
9
2101
by: Carter Smith | last post by:
http://www.icarusindie.com/wiki/index.php/Server-Side_Javascript_Check Sample source included This method requires that your pages are PHP enabled and you have mySQL. Although I suppose you could also use PHP sessions (not cookies as they're client editable). You could actually use any server side scripting language such as Perl or ASP and any database like MS SQL Server. I prefer PHP and MySQL.
6
1286
by: John | last post by:
Hi I have several web forms that require users verification by entering a code before they are allowed in. I have created a separate web form for entering and verifying user code. How do I incorporate this with web forms that require security? I am very new to this and would appreciation some clarification on how this sort of thing works in asp.net. Thanks
6
3236
by: Antonios Christofides | last post by:
Hi, I've prepared a test case about this, which I include below. I have tables "a" and "b"; "b" has a foreign key to "a", on delete cascade. In addition, there is a "before delete on b" trigger, which all that does is show the current_user. If a row is deleted from "a", and this triggers a delete from "b", which in turn activates the show_current_user trigger, the triggered function selects "current_user", and the result is the user who...
3
2695
by: Thomas Hallgren | last post by:
I'm connected to a database and I want to verify that a username and password for some user is correct. I know I can verify a users existence by doing: select exists(select * from pg_user where usename = $1) but I would like to verify the correctness of the password as well. Is there a way to do that using SQL? Regards,
1
1958
by: foothills bhc | last post by:
I have a problem with verifying content of controls on a form before closing the form or moving to the next form "record" (i.e., when moving to the next row of my form's record source). HERE'S THE LONG EXPLANATION OF THE PROBLEM First, A Description of the Form: I have developed a form for entering survey questionnaire data. The data to be entred on the form could be considered as two kinds of information. One kind could be called...
17
3913
by: teddysnips | last post by:
One of my clients has asked me to make a change to one of their Access applications. The application is a Front End/Back End standard app. I didn't develop it, but looking at it tells me that it was done entirely using the Wizards. There is no log-in procedure. They want to amend it so that only one person can be logged in at any one time. So, if Joe Bloggs tries to open the application, and Fred Jones has already connected, Joe...
0
9170
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9031
jinu1996
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...
0
8871
tracyyun
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...
0
7739
agi2029
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...
1
6528
isladogs
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...
0
5862
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2336
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2007
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.