Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


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

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
    Response.End
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.

 

 

Sitemap