Multiple Headers in asp.net

Posted by digiguru on Stack Overflow See other posts from Stack Overflow or by digiguru
Published on 2010-01-13T15:44:46Z Indexed on 2010/04/04 22:03 UTC
Read the original article Hit count: 440

Filed under:
|
|

I'm running code that seems to hit the "AppendHeader" twice in the code.

Response.Filter = New DeflateStream(Response.Filter, CompressionMode.Compress, True)
Response.AppendHeader("Content-encoding", "deflate")

...

Response.AppendHeader("Content-encoding", "deflate")

I have tried using the following....

Response.Headers("Content-encoding") = "deflate"

But it says

This operation requires IIS integrated pipeline mode.

How do I check for a headers existence, and overwrite it rather than appending it.

© Stack Overflow or respective owner

Related posts about deflate

Related posts about compression