Hi,
I'm trying to detect clien't bandwidth, with the following limitations:
1. No client-side programming (=>can't download an image for instance and once loaded redirect sending elapsed time).
2. Process should be totally seamless to client.
I came up with the following method:
1. I added a hidden image to my ASPX page.
2. Image SRC is set to an ASHX handler.
3. Handler reads a file of known size into buffer and sends it to client using context.Response.BinaryWrite(buffer), while timing delivery time (DateTime.Now before and after).
4. Calculated bandwidth (filesize/delivery time) is saved in session variable for future usage.
In my handler code I have set OutputBuffering to False, so content is delivered 'progressively' without buffering.
Will this method give me the actual download time for that file?
What would be the best delivery methos for achieving this (response.Write/response.transmitFile, etc.)?
Thanks
MK