Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: VB6,IIS4,IIS5
Expertise: beginner
Sep 23, 2000



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Use Response.IsClientConnected after long queries

When you perform a complex and time-consuming query in your ASP program, you should periodically test whether the client is still connected, using the IsClientConnected method of the Response object, as in :

' a lenghty query here
' ...
' check whether the client is connected before sending results
If Response.IsClientConnected = False Then
    ' stop processing if client disconnected
End If
' else send the query results
' ...
Note that IIS5 has fixed a bug of this method. Under IIS4, in fact, the result from Response.IsClientConnected couldn't be relied upon unless you had already sent some output to the client.
Francesco Balena
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date