Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

sqlexpress database file auto-creation error, dbf2mysql parameter, WWWXXXAPC, wwwxxxAPC, How to unsubscrube from dategen spam, docmd.close 2585, WWWXXXDOCO, nu vot, dhcpd lease file "binding state", WWWXXXDOCO

Links

XODOX
Impressum

#1: overwriting http headers set in iis

Posted on 2008-01-21 23:30:22 by Zester

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

Report this message

#2: Re: overwriting http headers set in iis

Posted on 2008-01-22 02:23:43 by Ken Schaefer

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@nottospam.com> wrote in message
news:eHLnV0HXIHA.1208@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
>
>

Report this message

#3: Re: overwriting http headers set in iis

Posted on 2008-01-22 04:25:05 by David Wang

On Jan 21, 2:30=A0pm, "Zester" <z...@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
//

Report this message