2011-11-24 46 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