title: Html.Action throwing exception: An exception of type 'System.Web.HttpException' occurred in System.Web.dll
body: <p>I'm getting this error from <code>@Html.Action("getCategory", "Blogs")</code> in the master layout for my blog.  </p>
  
  <p>The error is:</p>
  
  <blockquote>
    <p>An exception of type 'System.Web.HttpException' occurred in System.Web.dll but was not handled in user code
    Additional information: Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'.</p>
  </blockquote>
  
  <p>Here is my controller:</p>
  
  <pre><code>public ActionResult getCategory()
      {
          var categories = _repo.getBlogs().Select(c =&gt; new
          {
              c.Category
          }).ToList();
          return PartialView("_category", categories);
      }
  </code></pre>
  
  <p>And here is my partial view:</p>
  
  <pre><code>@model  IEnumerable&lt;MainSite.Data.Blog&gt;
  
  &lt;div class="sw_categories"&gt;
  &lt;div class="sw_title"&gt;
      &lt;h4&gt;Categories&lt;/h4&gt;
  &lt;/div&gt;
  &lt;ul class="arrows_list"&gt;
      @foreach (var c in Model)
      {
          &lt;li&gt;&lt;a href="#"&gt;@c&lt;/a&gt;&lt;/li&gt;
      }
  &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I'm pretty new to ASP.NET MVC, so could anyone please explain the error to me and how I could fix this?</p>