I've been playing with a small sample that shows how to do ajax style progress bars for long running tasks on the server and found a really strange problem that I hope someone can explain to me.
The source is here if anyone wants to play.
The idea is that when an update panel is posted back to the server I hook into this via the PageRequestManager BeginRequest and start a second callback going that can query the state of the original task.
This all works fine until you add a Global.ascx file to the project. At this point all the out of band callbacks that are meant to update the progress bar seem to be defered until after the first callback completes.
To see what I mean, grab the sample above run it then 'add a new item->Global Application Class' and run it again and the progress bar will fail to update. If you put a break point on GetCurrentStatus in UpdateProgressPage class you see that all the request
come in after the first callback completes!
Can anyone can explain this to me, I'm at a loss!!
BTW i've only tried this on two machines so far, I'd be intreasted to know if anyone else has the problem.
Thanks,
Stephen.