【发布时间】:2011-07-12 20:25:05
【问题描述】:
我在 web.config 中添加了以下部分:
<system.webServer>
<caching>
<profiles>
<add extension=".html" policy="CacheUntilChange" kernelCachePolicy="DontCache" location="Client" />
<add extension=".htm" policy="CacheUntilChange" kernelCachePolicy="DontCache" location="Client" />
<add extension=".gif" policy="CacheUntilChange" kernelCachePolicy="DontCache" location="Client" />
<add extension=".js" policy="CacheUntilChange" kernelCachePolicy="DontCache" location="Client" />
<add extension=".css" policy="CacheUntilChange" kernelCachePolicy="DontCache" location="Client" />
<add extension=".jpg" policy="CacheUntilChange" kernelCachePolicy="DontCache" location="Client" />
</profiles>
</caching>
</system.webServer>
但我的 web.config 中出现错误,提示:
无法识别的配置部分 system.web/caching/profiles
另外,我在 Visual Studio 中看到了这个:
元素缓存有无效的子元素“profiles”,可能的预期列表:cache、outputcache、outputcacheSettings、sqlCacheDependency'
当我在网上看到很多具有这种精确配置的示例时,这个配置是否发生了变化?
【问题讨论】:
-
在您提供的链接中,部分位于
我想知道这是否会有所不同。
标签: asp.net-mvc caching web-config profiles