4

我们正在运行一个 ASP.NET MVC 2.0 Web 应用程序,它在带有 IIS 6.0 的 Windows Server 2003 上运行。我知道使用 IIS7+,您可以使用:

<staticContent>
  <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="365:00:00"/>
</staticContent>

有没有办法获得与 IIS6 相同的功能?我们无权访问服务器设置,因此我们也无法以这种方式更改它。

4

1 回答 1

1

If you have access to the webserver, you can do this within IIS manager.

Check out this article on Microsoft Technet for more info:

http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/0fc16fe7-be45-4033-a5aa-d7fda3c993ff.mspx?mfr=true

To set the expiration of Web site content

  1. In IIS Manager, double-click the local computer; right-click the Web Sites folder, an individual Web site folder, a virtual directory, or a file; and then click Properties.

  2. Click the HTTP Headers tab.

  3. Select the Enable content expiration check box.

  4. Click Expire immediately, Expire after, or Expire on, and type the appropriate expiration information in the corresponding boxes.

  5. Click OK.

于 2011-07-26T08:31:50.177 回答