1

Resolved

Contrib.Cache Response.Flush() throws System.Web.HttpException

description

After turning on Failed Request Tracing, and reading through the errors that occur, I noticed this one comes up quite often.

System.Web.HttpException: 0x80070057

I tracked the error down to..

Filters\OutputCacheFilter.cs: OutputCacheFilter.OnResultExecuted(ResultExecutedContext)

From what I've read: stackoverflow
Before calling Response.Flush(), IsClientConnected should be checked.
if(response.IsClientConnected)
    response.Flush();
That prevents the exception from occurring, not sure about any other ramifications.

comments

sebastienros wrote Apr 30, 2013 at 5:26 PM

Fixed in c7f0757ea66d