How to know - IIS Compression

G

Guest

I wanted to know in the application whether IIS Compression is enabled or not
and switch the code accordingly, is there any way to track whether
Compression is enabled or not in vb.net program.
 
K

KJ

I think you can check the value of the Accept-Encoding header, via the
Request.Headers collection. You'd be looking for something like the
string value "gzip"
 
G

Guest

I tried this but its always returning "gzip,deflate" irrespective of whether
the compression is enabled or not.
 
J

Joerg Jooss

KJ said:
I think you can check the value of the Accept-Encoding header, via the
Request.Headers collection. You'd be looking for something like the
string value "gzip"

This only tells you whether the *client* accepts compressed data.

Cheers,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top