0

我们在 IIS 中的默认网站中有一个包含 Web 应用程序的文件夹。有几个应用程序,我们想将效果限制在一个:

     >   c:\inetpub\wwwroot\foo

\foo 下有文件夹,每个文件夹都有一个同名的 HTML 页面:

       > foo
           sis
              publish.htm
           boom
              publish.htm
           bah
              publish.htm

这些publish.htm文件将不时进行编辑。 我们希望防止它们被缓存在 Microsoft Edge 中。 它们是 ClickOnce 文件,只能使用 Edge v92 或更高版本打开它们。

是否web.config 可以将其放置在每个子文件夹sisboom和 中bah?有没有办法将它放在文件夹中foo并编辑路径,以便它包含任何通向任何名为的文件的路径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>
4

0 回答 0