Reputation: 5418
<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>
I am trying to add Caching versioned static files with ASP.NET MVC on IIS7. I got "The element 'system.webServer' has invalid child element 'rewrite'" error.
How can I fix this?
Upvotes: 0
Views: 452
Reputation: 2120
There is this post over at asp.net that may be of help. Als there is this scottgu post. I hope those will get you on the right path.
Upvotes: 1