st7*_*t78 13 asp.net-mvc json outputcache
我试图这样做,它导致contentlen 0的结果
看起来像:
[OutputCache(Duration = 36000)]
public JsonResult GetFileClasses()
{
return this.Json(TopicConfig.FileExtensionsSettings.List)
}
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?
Bra*_*nov 15
在OutputCacheAttribute
你还必须指定,VaryByParam
参数.否则,您将在结果处理中获得此异常System.Web.HttpException: The directive or the configuration settings profile must specify the 'varyByParam' attribute.
您可以尝试添加此参数并查看它是否有效.
归档时间: |
|
查看次数: |
2715 次 |
最近记录: |