This is a discussion on "Response.IsClientConnected does not work in IIS6" within the Classic ASP section. This forum, and the thread "Response.IsClientConnected does not work in IIS6 are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Response.IsClientConnected does not work in IIS6
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Hello,
The Response.IsClientConnected property return always TRUE in IIS6. I believe this is a bug in IIS5.1 and IIS6. Is there anybody that knows how to solve this problem or if there is a way around? Any help is deeply appreciated. Sincerely Jacque |
|
|
|
#2
|
|||
|
|||
|
Re: Response.IsClientConnected does not work in IIS6
Can you post your code?
|
|
#3
|
|||
|
|||
|
The thing is that exactly the same code works perfectly in my development environement using IIS5 running on W2K. However, when this code is uploaded to my production server running IIS6 on Win2003, the Response.IsClientConnected property always returns True.
The code is quite simple and looks like this: '************************************* Response.ContentType = INFileType Response.Buffer = False Response.Expires = -1 Call Response.AddHeader ("Content-Disposition", "attachment; filename=" & INFileName) Call Response.AddHeader ("Content-Length", INFileSize) Do Response.BinaryWrite tempDataStream.Read(cteBatchSize) Loop until (Response.IsClientConnected=false or tempDataStream.EOS=true) '***************************************** The idea is to stop the download process server side whenever the client cancels it or the file is completely downloaded. However, what I am experiencing is that even when the customer cancels the download, the loop is executed until EOS=true because Response.IsClientConnected never returns False. The download process is so that whenever a customer clicks on a download link he is redirected to an asp-file that makes some processing to check the validity of the link. If the link is valid, the download dialog box is prompted and the file streamed by the code shown above. Every thing happens in the same ASP-page. |
![]() |
| Tags |
| work, iis6 |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Response.write if statements in a form? | natalief2008 | Classic ASP | 1 | May 5th, 2008 21:58 |
| WrapArray for displaying XML/SOAP response | solovengo | JavaScript Forum | 0 | Nov 17th, 2007 00:18 |
| Cant figure out senton and response | Foobster | ASP.NET Forum | 0 | Aug 15th, 2007 10:01 |