473,394 Members | 1,889 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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
clientConnectedCheck. Can it be used for that kind of verification?

Thanks,
Robert Scheer

Nov 19 '05 #1
2 2298
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.googlegr oups.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
clientConnectedCheck. 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.IsClientConnected

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
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...
4
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...
1
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...
9
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...
6
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...
6
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,...
3
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...
1
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...
17
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.