[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Disconnect a client with ASP?

Posted on 2002-03-28
6
Medium Priority
?
253 Views
Last Modified: 2012-06-27
Hi,

Is it possible to disconnect a client from the server-side, using ASP? I want to write the response, flush it, then disconnect the client without waiting for the IIS connection time-out to take effect. I don't think there is a way to do this but I'd be very happy to be proved wrong.

Pete
0
Comment
Question by:pete_c
6 Comments
 
LVL 12

Expert Comment

by:Gregory Miller
ID: 6902200
You can not physically disconnect the client but you can end their session by using the Session.Abandon method. If you want to clear the screen of current content you could also redirect to another page immediately after and this should solve.

Good Luck,
-greg
0
 
LVL 2

Expert Comment

by:manihopever
ID: 6902295
just do a response.end in where you want to disconnect them.

mani.v
0
 
LVL 10

Expert Comment

by:makerp
ID: 6902300
session.abandon
response.end

also switch connection keep-alives off in IIS admin
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:pete_c
ID: 6902389
Thanks everyone.

Session.Abandon just wipes out any session variables. Likewise, Response.End will just stop processing of the current script. Switching off http keep-alives will result in the IIS-determined connection time-out being honoured but I need to programmatically disconnect the client from the server when I choose, in a way equivalent to being able to set Response.isClientConnected to False. None of the above really does that.
0
 
LVL 10

Accepted Solution

by:
makerp earned 60 total points
ID: 6902400

but switching off keep-alives and calling response.end will terminate any connection as when you call response.end the server will finish with the script and close the underlying socket with the client
0
 

Author Comment

by:pete_c
ID: 6902659
I'm sure that's right - it's just not working as I would expect in the web app we're developing. I guess we'll have to look elsewhere for the answer to our particular problem. The points are yours.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month20 days, 5 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question