+2  A: 

Personally in your implementation since the next line is Response.End(), just remove the call to Response.Flush() as Response.End() takes care of everything for you.

Mitchel Sellers
+4  A: 

While I agree with Mitchel - there's little need to call flush as you're about to call End, if you're using this elsewhere, you could try calling Response.IsClientConnnected first.

Gets a value indicating whether the client is still connected to the server.

Zhaph - Ben Duguid
so, could I wrap my .Flush() and .End() in a .IsClientConnected and have that fix my issue do you think? The client's customers do not receive the error on their screens, I just get emails from ELMAH each time. Just a minor annoyance more than anything.
Anthony Shaw
You could certainly wrap the .Flush in the check - not too sure about any repercussions of not calling .End... I assume there's some long running process in there that's causing people to disconnect before you've finished generating the image?
Zhaph - Ben Duguid