Solved

Disconnect a client with ASP?

Posted on 2002-03-28
6
231 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 11

Expert Comment

by:Technodweeb
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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 

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 20 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

707 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now