14

私はこれを行おうとしていますが、contentlen0の結果になります

次のようになります。

[OutputCache(Duration = 36000)]
public JsonResult GetFileClasses() 
{
   return this.Json(TopicConfig.FileExtensionsSettings.List)
}

何か案は?

4

1 に答える 1

16

で、パラメータOutputCacheAttributeも指定する必要があります。VaryByParamそうしないと、結果処理でこの例外が発生しますSystem.Web.HttpException: The directive or the configuration settings profile must specify the 'varyByParam' attribute. 。このパラメーターを追加して、機能するかどうかを確認できます。

于 2010-01-19T14:42:11.863 に答える