overwriting http headers set in iis

Hi,

My application have these headers added in IIS:
Pragma:No-cache
Cache-control: No-cache, no-store

That's what we want for all pages except for when we need to allow users to
download pdf file; with those headers; IE would not be able to get the pdf
file because it needs to store the file locally. Is there a way to overwrite
the headers for only a few pages ?

thank you very much
Zester [ Mo, 21 Januar 2008 23:30 ] [ ID #1913253 ]

Re: overwriting http headers set in iis

Easiest way would be to put all these files into a single folder (or
folders).

And then in IIS Manager, configure that folder to not have those HTTP
headers added.

Cheers
Ken

"Zester" <zeze [at] nottospam.com> wrote in message
news:eHLnV0HXIHA.1208 [at] TK2MSFTNGP03.phx.gbl...
> Hi,
>
> My application have these headers added in IIS:
> Pragma:No-cache
> Cache-control: No-cache, no-store
>
> That's what we want for all pages except for when we need to allow users
> to download pdf file; with those headers; IE would not be able to get the
> pdf file because it needs to store the file locally. Is there a way to
> overwrite the headers for only a few pages ?
>
> thank you very much
>
>
Ken Schaefer [ Di, 22 Januar 2008 02:23 ] [ ID #1913932 ]

Re: overwriting http headers set in iis

On Jan 21, 2:30=A0pm, "Zester" <z... [at] nottospam.com> wrote:
> Hi,
>
> My application have these headers added in IIS:
> Pragma:No-cache
> Cache-control: No-cache, no-store
>
> That's what we want for all pages except for when we need to allow users t=
o
> download pdf file; with those headers; IE would not be able to get the pdf=

> file because it needs to store the file locally. Is there a way to overwri=
te
> the headers for only a few pages ?
>
> thank you very much


It depends on how you added those headers:
- If your application code adds the headers, then you should fix the
application code to not add the headers for downloadable files.
- If you use HttpCustomHeaders to add the headers to static files,
then you can use HttpCustomHeaders for each file and selectively
disable the added headers
- In all cases, you can write ISAPI Filter to overwrite the response
headers, but this is the most expensive and least performant method.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//
David Wang [ Di, 22 Januar 2008 04:25 ] [ ID #1913933 ]
Webserver » microsoft.public.inetserver.iis » overwriting http headers set in iis

Vorheriges Thema: 3rd party web app can't install correctly (windows 2003 sp1)
Nächstes Thema: 2003 SP2 IIS 6.0 401.2