Response.IsClientConnected

Discussion in 'ASP General' started by alien2_51, Aug 26, 2003.

  1. alien2_51

    alien2_51 Guest

    I need to know if the client is connected from the session_end, how can I do
    this.....
     
    alien2_51, Aug 26, 2003
    #1
    1. Advertising

  2. alien2_51

    alien2_51 Guest

    "Scott M." <> wrote in message
    news:eX#...
    > 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" <> wrote in message
    > news:%...
    > > I need to know if the client is connected from the session_end, how can

    I
    > do
    > > this.....
    > >
    > >

    >
    >
     
    alien2_51, Aug 26, 2003
    #2
    1. Advertising

  3. alien2_51

    Alan Guest

    > > 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
     
    Alan, Aug 26, 2003
    #3
  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.
     
    Adrian Forbes - MVP, Aug 27, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Charles A. Lackman
    Replies:
    2
    Views:
    8,100
    Charles A. Lackman
    Jan 11, 2006
  2. alien2_51

    Response.IsClientConnected

    alien2_51, Aug 26, 2003, in forum: ASP .Net
    Replies:
    5
    Views:
    609
    William Tasso
    Aug 27, 2003
  3. Raj

    IsClientConnected

    Raj, Jun 18, 2010, in forum: ASP .Net
    Replies:
    1
    Views:
    516
  4. Pete

    IsClientConnected

    Pete, Oct 24, 2003, in forum: ASP General
    Replies:
    3
    Views:
    194
    Egbert Nierop \(MVP for IIS\)
    Oct 28, 2003
  5. kibokochui
    Replies:
    5
    Views:
    268
    kibokochui
    Jan 18, 2006
Loading...

Share This Page