title: Deploying MVC site to IIS results in it cannot find default shared partial view
body: <p>I have a site that works perfectly on my local IIS. </p>
  
  <p>All my pages uses a default shared partial view, which is called the expected <code>_Layout.cshtml</code>. This view is placed in my Shared folder. This can be seen here:</p>
  
  <p><img src="https://i.stack.imgur.com/BLuH7.png" alt="enter image description here"></p>
  
  <p>This works perfectly, as I would expect.</p>
  
  <p>However, I now publish my website. Then, some of my pages outside the <code>HomeController</code>, results in a :</p>
  
  <pre><code>The view 'Index' or its master was not found or no view engine supports the searched locations. The following locations were searched:
  ~/Views/Search/Index.aspx
  ~/Views/Search/Index.ascx
  ~/Views/Shared/Index.aspx
  ~/Views/Shared/Index.ascx
  ~/Views/Search/Index.cshtml
  ~/Views/Search/Index.vbhtml
  ~/Views/Shared/Index.cshtml
  ~/Views/Shared/Index.vbhtml
  </code></pre>
  
  <p>This is of course true, but I would expect it to search for <code>_Layout.cshtml</code> in my shared folder, and not these file names.</p>
  
  <p>What can I do to solve it? And why does it work on my local IIS, and not on production?</p>