I'm trying to use DevTrends Donut Caching in an MVC app in a shared hosting environment.
When I upload the app I get this error:
System.Security.SecurityException: MvcDonutCaching does not have permission to read web.config section 'OutputCacheSettingsSection'.
The host provider says that this restriction is due to the Medium Trust environment.
While I am not knowledgable enough to argue with this, it seems strange / unreasonable that basic Web.Config settings are unavailable under medium trust.
Plus, at the bottom of this workitem, from 2012, the author states that:
I have added some code to allow MvcDonutCaching to be used in a strict Medium Trust environment
Should I be able to access these settings in a medium trust environment?
The caching settings that I am using in web.config are like this:
<system.web> <caching> <outputCacheSettings> <outputCacheProfiles> <add name="CacheFor1Hour" duration="3600" varyByParam="none" /> <add name="RecacheOnUpdate" duration="2419200" varyByParam="*" /> <add name="Dashboard" duration="86400" varyByParam="*" varyByCustom="User" location="Server" /> </outputCacheProfiles> </outputCacheSettings> </caching> </system.web>