title: why i am getting "Duration must be a positive number.", when defining a CacheProfile
body: <p>I have the following Action method:-</p>
  
  <pre><code>[HttpGet]
  [OutputCache(CacheProfile = "long", Location = OutputCacheLocation.Server, VaryByHeader = "X-Requested-With")]
  public PartialViewResult LatestAssets()
  {
  var tech = repository.LatestTechnology().OrderByDescending(a =&gt; a.TechnologyID).Take(5).ToList() ;
  return PartialView("_Latest",tech);
  }
  </code></pre>
  
  <p>which is calling inside the _layout view through the following code:-</p>
  
  <pre><code>&lt;li class="nav-header hidden-tablet"style="background-color:#3E9BD4 ; color:white"&gt;Latest Assets&lt;/li&gt;
  @Html.Action("LatestAssets","Home")
  </code></pre>
  
  <p>The Cache Profile is define inside the web.config as follow:-</p>
  
  <pre><code> &lt;system.web&gt;
      &lt;caching&gt;
        &lt;outputCacheSettings&gt;
          &lt;outputCacheProfiles&gt;
            &lt;add name="long" duration="300" /&gt;
            &lt;add name="Short" duration="100" /&gt;
          &lt;/outputCacheProfiles&gt;
        &lt;/outputCacheSettings&gt;
      &lt;/caching&gt;
  </code></pre>
  
  <p>but i am getting the following code when the action method is called:-</p>
  
  <blockquote>
    <p>Duration must be a positive number.    Description: An unhandled
    exception occurred during the execution of the current web request.
    Please review the stack trace for more information about the error and
    where it originated in the code. </p>
    
    <p>Exception Details: System.InvalidOperationException: Duration must be
    a positive number</p>
  </blockquote>
  
  <p>And if i remove the CacheProfile the above will work fine.
  any idea what is causing this error. </p>