title: ASP.NET MVC 3 partial view not found
body: <p>I have following problem. In my solution I have 2 controllers: Home and Account. Everything works so far. But when I add [Authorize] above HomeController eg</p>
  
  <pre><code>[Authorize]
  public class HomeController : Controller
  {
  ...
  </code></pre>
  
  <p>I get </p>
  
  <pre><code>System.InvalidOperationException: The partial view 'Repository' was not found or no view engine supports the searched locations. The following locations were searched:
  ~/Views/Account/Repository.aspx
  ~/Views/Account/Repository.ascx
  ~/Views/Shared/Repository.aspx
  ~/Views/Shared/Repository.ascx
  ~/Views/Account/Repository.cshtml
  ~/Views/Account/Repository.vbhtml
  ~/Views/Shared/Repository.cshtml
  ~/Views/Shared/Repository.vbhtml
  </code></pre>
  
  <p>Partial view Repository is inside HomeController so therefore its View is in ~/Views/Home/Repository.cshtml, but it's seacrhed in Shared or Account folders. As I said, if there is no [Authorize] above HomeController class, everything works as expected.</p>
  
  <p>The code where error occurs is in _Layout.cshtml</p>
  
  <pre><code>@Html.Partial("Repository")
  </code></pre>
  
  <p>Thanks for help.</p>