Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Verifying the user is connected

Reply
Thread Tools

Verifying the user is connected

 
 
Robert Scheer
Guest
Posts: n/a
 
      09-18-2005
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

 
Reply With Quote
 
 
 
 
S. Justin Gengo
Guest
Posts: n/a
 
      09-18-2005
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" <> wrote in message
news: 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
>



 
Reply With Quote
 
 
 
 
sreejith.ram@gmail.com
Guest
Posts: n/a
 
      09-19-2005
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Connection between a lan-connected pc and a wireless connected =?Utf-8?B?Q2lhY2NpaG9tZQ==?= Wireless Networking 1 08-17-2006 11:00 AM
Wireless connected but don't have LAN connected Thaqalainnaqvi@gmail.com Computer Support 6 06-11-2006 09:06 PM
connected but not connected =?Utf-8?B?R2xlbm4=?= Wireless Networking 1 12-04-2005 12:35 AM
problem: connected, but not connected to a wireless network Andrew Smith Wireless Networking 0 08-20-2004 07:51 PM
Connected Icon Showing, But In Reality Not Connected. Thoughts On ? Robert11 Computer Support 2 03-02-2004 04:02 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57