473,394 Members | 2,020 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.

Response.IsClientConnected

I need to know if the client is connected from the session_end, how can I do
this.....
Jul 19 '05 #1
4 4523

"Scott M." <s-***@badspamsnet.net> wrote in message
news:eX**************@TK2MSFTNGP10.phx.gbl...
Session_End fires when the session is no longer valid
Sorry.. That's not true.. Session_End fires when the timeout has been
exceeded....
The session is still valid in the Session_End... I have full access to all
session vars inside the end event..

so you would never have a connected client at that point.

Try:

If Response.IsClientConnected Then
your code here
End If

But put this code into an event prior to Session_End.
Be specific please... What event fires before Session_End...?

Also, please do not cross-post as you have done with this message.
I made 1 post to many newsgroups... Whats wrong with that....?


"alien2_51" <da********@n.o.s.p.a.m.monacocoach.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
I need to know if the client is connected from the session_end, how can
I do
this.....


Jul 19 '05 #2
> > Also, please do not cross-post as you have done with this message.

I made 1 post to many newsgroups... Whats wrong with that....?


It's generally considered bad 'netiquette' to post a single message to
multiple groups - especially when the groups chosen (dotnet and classic ASP)
have little in common.
http://www.my-newsgroups.com/SiteMap/netiquette.htm

Alan
Jul 19 '05 #3
Alan wrote:
Also, please do not cross-post as you have done with this message.
I made 1 post to many newsgroups... Whats wrong with that....?


It's generally considered bad 'netiquette' to post a single message to
multiple groups


generally - sorry we have to disagree.
especially when the groups chosen (dotnet and
classic ASP) have little in common.


however, we do agree in that particular instance ;o)

multi-posting OTOH is always irritating for well documented reasons

--
William Tasso - http://WilliamTasso.com
Jul 19 '05 #4
> I need to know if the client is connected from the
session_end, how can I do this.....


Use this handy routine in your session_onend;

bClientConnected = False

Now if you want to know if the client is connected in your
session_onend simply query the value of "bClientConnected".

The only time the client is "connected" to your server is
when they are physically receiving a response which is why
you would use Response.IsClientConnected inside a normal
ASP page. If you were writing out 100,000 lines of a
table you might want to check that the data is being
receieved by a browser somewhere.

Beyond the milliseconds that client and server are
connected via TCP/IP, the server has no way of knowing if
the client is still looking at their site or if they have
shut the browser or are just looking at other sites.

When the session_onend fires the server is telling you
that it is now assuming that the client has wandered off
and is no longer interested in your site. It can't know
for sure cos HTTP is connectionless, so it makes the best
guess it can and relies on the timeout.
Jul 19 '05 #5

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

Similar topics

3
by: alien2_51 | last post by:
I need to know if the client is connected from the session_end, how can I do this.....
9
by: Dominic Godin | last post by:
Hi, I have an asp page that does a lot of processing and reports it's finished by printing the word "Success". For example: <% SomeFunction(SomeVar) SomeFunction(SomeVar1) ...
2
by: Zam | last post by:
Hello World, Under Windows 2003 Server. IIS6. The following code working fine for small files, and for files with size about few megabytes. If I am trying to send HUGE file -- about 700...
0
by: ProJee | last post by:
Hi, Response.WriteFile (or Response.OutputStream.Write) finishes immediately, not after the file is completely downloaded. It finishes before (!) the user clicks the "Save" or "Open" browser...
2
by: hoenes1 | last post by:
I've got an aspx-Page "SendFile.aspx" which is called by a Link on "ShowListOfFiles.aspx" and sends the file in the OnLoad Eventhandler. The filename to download is stored in a Session variable....
6
by: john | last post by:
The standard method to transmit a file from an aspx page to a browser is to stream the file to the response then end the response. The HTML code generated by the aspx page is discarded, and the...
0
by: Jacque | last post by:
Hello, The Response.IsClientConnected property return always TRUE in IIS6. I believe this is a bug in IIS5.1 and IIS6. Is there anybody that knows how to solve this problem or if there is a way...
2
by: Michael D. Ober | last post by:
When I single step through the code below, it sends back the PDF file that is retrieved in the line fm.GetAccountPDF(...). When I run without single stepping, I get the master page for this page. ...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...
0
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...
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.