2011-11-24 60 views
0
<system.webServer> 
    ... 
    </handlers> 
    <staticContent> 
     <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00" /> 
    </staticContent> 
    <rewrite> 
     <rules> 
     <rule name="StaticFiles" stopProcessing="true"> 
      <match url="StaticContent/[\d.]+/(.*)$" /> 
      <action type="Rewrite" url="StaticContent/{R:1}" /> 
     </rule> 
     </rules> 
    </rewrite> 
    </system.webServer> 

我想在IIS7上添加使用ASP.NET MVC的缓存版本化静态文件。 我得到“元素'system.webServer'有无效的子元素'重写'”错误。在IIS7上使用ASP.NET MVC缓存版本化静态文件

我该如何解决这个问题?

回答

2

在asp.net上有this post可能有帮助。 Als有这个scottgu post。我希望那些能够让你走上正确的道路。

+0

非常感谢Ashok。我忘了为IIS安装URL重写模块。 – gandil