Our default website in IIS has a folder in it that houses a web-application. There are several applications and we want to limit the effect to only the one:
> c:\inetpub\wwwroot\foo
There are folders beneath \foo, each of which has an HTML page of the same name:
> foo
sis
publish.htm
boom
publish.htm
bah
publish.htm
These publish.htm
files will be edited from time to time. We want to prevent them from being cached in Microsoft Edge. They are ClickOnce files and only Edge v92 or later will be used to open them.
Could this web.config
be placed in each of the child folders, sis
, boom
, and bah
? Is there a way of putting it in folder foo
and editing the path so it includes any path that leads to any file called publish.htm
?
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<location path="publish.htm">
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Cache-Control" value="no-cache" />
</customHeaders>
</httpProtocol>
</system.webServer>
</location>
</configuration>