views:

520

answers:

2

I developed a progress bar widget in CF and it works wonderfully on my local machine running on a built-in CF8 development server. However, our production and staging boxes are running Win2k3 and IIS which I can't get to respect the CFFLUSH tag. Even padding the buffer with responses doesn't work too well as it is rather unpredictable whether or not IIS will actually flush the buffer when told to do so. Does anyone know of a way to make IIS flush its buffer or any other way to solve this problem without changing the architecture to using short polling instead?

+2  A: 

A quick google shows a few other people with similar problems. I found one post that suggests IIS has a minimum buffer size which could be effecting it. The solution posted there is basically to pad the buffer but that's as you said not going to be reliable.

Could you move to some kind of ajax powered poller/status bar like here jsprogressbarhandler (google for "jsprogressbarhandler ajax")

Ian
I ended up changing the code from long to short polling. Not exactly the approach I wanted to take but it works well enough, which is more than could be said for the long polling approach. My concern with short polling is putting so much strain on the client by evaling quite often and if any large amount of JS is returned from the sever I would have to move to using dynamic script tags. It works for now though, thanks for the response.
illvm
+2  A: 

Hey illvm,

Just as an FYI, if you do decide you need to go back to a long polling solution at some point, there is a full-blown comet server for IIS - check it out at:

www.frozenmountain.com/websync

John Smith