this seems so silly - i must be missing something obvious. I have the following code (just as a test):
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
void page_load(object o, EventArgs e)
{
Response.Write(new string(' ', 255));
Response.Flush();
for (int i = 0; i < 10; i++)
{
Response.Write(i + "<BR>");
Response.Flush();
System.Threading.Thread.Sleep(500);
}
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
main div
</div>
</form>
</body>
</html>
when i test this locally (vista x64, cassini), i get the desired output.. 1, then 2, then 3, etc are all sent non-buffered to the browser. when i try this on the dev server (2003, iis6) it just buffers it all and sends it all at once. is there something obvious i'm missing?? I've also tried putting buffer=false at the top but that also doesn't change this behaviour.
to further clarify, i've done a test with fiddler to compare two servers. the first server is a local server on the LAN, the second is a public server. fiddler found no discernible difference between the two, except for the host name. the LAN server did not write out the response until the page had finished loading, the public server wrote the response as it happened. i can also confirm this behaviour happens in both firefox and ie.