c# - The enableOutputCache parameter is not allowed -


i'm trying block ie caching webpage. after reading question here found there 2 solutions:

adding

[outputcache(duration = 0)]  

to each controller or add web.config

<caching>     <outputcache enableoutputcache="false" /> </caching> 

i decided go second way. after putting config file:

<system.web>   <compilation debug="true" targetframework="4.5" />   <httpruntime targetframework="4.5" />   <authentication mode="windows" />   <authorization>   <deny users="?" />     </authorization>     <customerrors mode="off" />     <caching>        <outputcachesettings enableoutputcache="false" />     </caching> </system.web> 

the enableoutputcache paremeter underlined message: "the enableoutputcache parameter not allowed" wrong code?

i think syntax error.

this should be:

<system.web>   <compilation debug="true" targetframework="4.5" />   <httpruntime targetframework="4.5" />   <authentication mode="windows" />   <authorization>   <deny users="?" />   </authorization>   <customerrors mode="off" />   <caching>       <outputcache enableoutputcache="false" />   </caching> </system.web> 

if want know how use outputcachesettings can find answer here.


Comments

Popular posts from this blog

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -