views:

60

answers:

1

I am trying to do this, and it leads to result with contentlen 0

It looks like:

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

Any ideas?

+2  A: 

In OutputCacheAttribute you must also specify , VaryByParam parameter. Otherwise you'll get this exception on result processing System.Web.HttpException: The directive or the configuration settings profile must specify the 'varyByParam' attribute. You can try to add this parameter and see if it works.

Branislav Abadjimarinov
To clarify: `[OutputCache(Duration=36000, VaryByParam="")]`. Thank you Branislav, this has been driving me nuts as well!!!
mynameiscoffey