asp.net - "Invalid use of response filter" when compressing response from an IHttpHandler -
i have ihttphandler returning file. when response stream compressed, either automatically using telerik radcompression or explicitly setting filter using
context.response.filter = new gzipstream(context.response.filter, compressionmode.compress);
the response returned browser correct @ end of response html. html contains exception:
[httpexception (0x80004005): invalid use of response filter] system.web.httpresponsestreamfiltersink.verifystate() +3928894 system.web.httpresponsestreamfiltersink.write(byte[] buffer, int32 offset, int32 count) +28 system.io.compression.deflatestream.dispose(boolean disposing) +363 system.io.stream.close() +28 system.io.compression.gzipstream.dispose(boolean disposing) +63 system.io.stream.close() +28 system.io.compression.deflatestream.dispose(boolean disposing) +595 system.io.stream.close() +28 system.io.compression.gzipstream.dispose(boolean disposing) +63 system.io.stream.close() +28 system.web.httpwriter.filterintegrated(boolean finalfiltering, iis7workerrequest wr) +754 system.web.httpresponse.filteroutput() +121 system.web.callfilterexecutionstep.system.web.httpapplication.iexecutionstep.execute() +174
if make sure response not compressed, response contains no exception.
what's that?
it seems related this: gzipstream cutting off last part of xml
i removed compression module , seem now.
Comments
Post a Comment