title: Deploying an MVC3 application on IIS7 always returns Http 500 - Internal Server Error
body: <p>When I try to deploy my MVC3 application on IIS7, on every URL I am getting an Http 500 - Internal Server Error.</p>
  
  <p>The site runs fine in development in Visual Studio.
  And I can request simple html pages, or aspx pages, and they return fine.
  I've tested if asp.net works by adding an aspx page that returns inline &lt;%= DateTime.Now.ToShortDateString() %>, which also works fine.
  So I think the problem is situated with MVC itself or the Routing.</p>
  
  <p>MVC3 is installed on the server, but I also tried bin deploying by setting all MVC related references to <code>copy local = true</code>.</p>
  
  <p>Any ideas ?</p>
  
  <p>Edit:</p>
  
  <p>I enabled failed request tracing, which results in no error logs.</p>
  
  <p>Customerrors are off &amp; Server errors are detailed :     </p>
  
  <pre><code>&lt;httpErrors errorMode="Detailed" /&gt;
  &lt;asp scriptErrorSentToBrowser="true"/&gt;
  &lt;customErrors mode="Off"/&gt;
  </code></pre>
  
  <p>The only thing I am getting is a 500 - Internal Server Error header with a blank page.</p>
  
  <p>I checked the event log for the webserver, nothing to find.</p>
  
  <p>After some restarts I'm getting a somewhat more detailed error :</p>
  
  <p><img src="https://i.stack.imgur.com/huWQD.png" alt="http500"></p>