Disconnect a client with ASP?

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
pete_cAsked:
Who is Participating?
 
makerpConnect With a Mentor Commented:

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
 
Gregory MillerGeneral ManagerCommented:
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
 
manihopeverCommented:
just do a response.end in where you want to disconnect them.

mani.v
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
makerpCommented:
session.abandon
response.end

also switch connection keep-alives off in IIS admin
0
 
pete_cAuthor Commented:
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
 
pete_cAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.