title: HTTP Error 500.19 - IIS 7.5, ASP.NET MVC 4
body: <p>I'm trying to get my MVC 4 web application deployed to IIS 7.5 but I'm running into a Internal Server error I cannot work around.  </p>
  
  <p>It seems to be choking on the bindingRedirect.  Taking it out causes other errors and so it is certainly needed.  I've got this installed on another IIS server and my local IIS with the same web.config and it works just fine.</p>
  
  <pre><code>    HTTP Error 500.19 - Internal Server Error
  
      The requested page cannot be accessed because the related configuration data for the page is invalid.
  
      Module    IIS Web Core 
  
      Notification    Unknown 
  
      Handler    Not yet determined 
  
      Error Code    0x8007000d 
  
      Config Error    Configuration file is not well-formed XML  
  
      Config File    \\?\D:\Reporting\web.config 
  
      Requested URL    http://localhost:80/ 
  
      Physical Path
  
      Logon Method    Not yet determined 
  
      Logon User    Not yet determined
  
  Config Source    
  
  &lt;assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" /&gt;
  &lt;bindingRedirect oldVersion=""0.0.0.0-4.0.0.0" newVersion="4.0.0.0" /&gt;
  &lt;/dependentAssembly&gt;
  </code></pre>
  
  <p>Here is my web.config.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;!--
    For more information on how to configure your ASP.NET application, please visit
    http://go.microsoft.com/fwlink/?LinkId=169433
    --&gt;
  &lt;configuration&gt;
  
    &lt;configSections&gt;
      &lt;sectionGroup name="elmah"&gt;
        &lt;section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah" /&gt;
        &lt;section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah" /&gt;
        &lt;section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah" /&gt;
        &lt;section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah" /&gt;
      &lt;/sectionGroup&gt;
  
      &lt;sectionGroup name="common"&gt;
        &lt;section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" /&gt;
      &lt;/sectionGroup&gt;
  
      &lt;section name="syscache2" type="NHibernate.Caches.SysCache2.SysCacheSection, NHibernate.Caches.SysCache2" /&gt;
  
    &lt;/configSections&gt;
  
    &lt;common&gt;
      &lt;logging&gt;
        &lt;factoryAdapter type="Common.Logging.Simple.TraceLoggerFactoryAdapter, Common.Logging"&gt;
          &lt;arg key="level" value="DEBUG" /&gt;
          &lt;arg key="showLogName" value="false" /&gt;
          &lt;arg key="showDataTime" value="true" /&gt;
          &lt;arg key="dateTimeFormat" value="yyyy/MM/dd HH:mm:ss:fff" /&gt;
        &lt;/factoryAdapter&gt;
      &lt;/logging&gt;
    &lt;/common&gt;
  
    &lt;syscache2&gt;
      &lt;!--See Configuration At: http://bit.ly/Yf12K1--&gt;
      &lt;cacheRegion name="hourly" relativeExpiration="3600" priority="Low" /&gt;
    &lt;/syscache2&gt;
  
    &lt;appSettings&gt;
      &lt;add key="webpages:Version" value="2.0.0.0" /&gt;
      &lt;add key="webpages:Enabled" value="false" /&gt;
      &lt;add key="PreserveLoginUrl" value="true" /&gt;
      &lt;add key="ClientValidationEnabled" value="true" /&gt;
      &lt;add key="UnobtrusiveJavaScriptEnabled" value="true" /&gt;
      &lt;add key="elmah.mvc.disableHandler" value="false" /&gt;
      &lt;add key="elmah.mvc.disableHandleErrorFilter" value="false" /&gt;
      &lt;add key="elmah.mvc.requiresAuthentication" value="false" /&gt;
      &lt;add key="elmah.mvc.allowedRoles" value="*" /&gt;
      &lt;add key="elmah.mvc.route" value="elmah" /&gt;
    &lt;/appSettings&gt;
  
    &lt;system.web&gt;
      &lt;customErrors mode="Off"/&gt; 
      &lt;httpRuntime targetFramework="4.5" /&gt;
      &lt;compilation targetFramework="4.5" /&gt;
  
      &lt;pages&gt;
        &lt;namespaces&gt;
          &lt;add namespace="System.Web.Helpers" /&gt;
          &lt;add namespace="System.Web.Mvc" /&gt;
          &lt;add namespace="System.Web.Mvc.Ajax" /&gt;
          &lt;add namespace="System.Web.Mvc.Html" /&gt;
          &lt;add namespace="System.Web.Routing" /&gt;
          &lt;add namespace="System.Web.WebPages" /&gt;
          &lt;add namespace="MvcPaging" /&gt;
        &lt;/namespaces&gt;
      &lt;/pages&gt;
  
      &lt;httpModules&gt;
        &lt;add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" /&gt;
        &lt;add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" /&gt;
        &lt;add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" /&gt;
      &lt;/httpModules&gt;
    &lt;/system.web&gt;
  
    &lt;system.webServer&gt;
      &lt;handlers&gt;
        &lt;remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" /&gt;
        &lt;remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" /&gt;
        &lt;remove name="ExtensionlessUrlHandler-Integrated-4.0" /&gt;
        &lt;add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" /&gt;
        &lt;add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" /&gt;
        &lt;add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" /&gt;
        &lt;add name="MiniProfiler" path="mini-profiler-resources/*" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" /&gt;
      &lt;/handlers&gt;
  
      &lt;validation validateIntegratedModeConfiguration="false" /&gt;
  
      &lt;modules&gt;
        &lt;add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" preCondition="managedHandler" /&gt;
        &lt;add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" preCondition="managedHandler" /&gt;
        &lt;add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" preCondition="managedHandler" /&gt;
      &lt;/modules&gt;
    &lt;/system.webServer&gt;
  
    &lt;runtime&gt;
      &lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" /&gt;
          &lt;bindingRedirect oldVersion=""0.0.0.0-4.0.0.0" newVersion="4.0.0.0" /&gt;
        &lt;/dependentAssembly&gt;
  
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" culture="neutral" /&gt;
          &lt;bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" /&gt;
        &lt;/dependentAssembly&gt;
  
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="NHibernate" culture="neutral" publicKeyToken="aa95f207798dfdb4" /&gt;
          &lt;bindingRedirect newVersion="3.3.1.4000" oldVersion="0.0.0.0-3.3.1.4000" /&gt;
        &lt;/dependentAssembly&gt;
  
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="Castle.Windsor" publicKeyToken="407dd0808d44fbdc" culture="neutral" /&gt;
          &lt;bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" /&gt;
        &lt;/dependentAssembly&gt;
  
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" /&gt;
          &lt;bindingRedirect oldVersion="0.0.0.0-1.3.0.0" newVersion="1.3.0.0" /&gt;
        &lt;/dependentAssembly&gt;
      &lt;/assemblyBinding&gt;
    &lt;/runtime&gt;
  
  &lt;/configuration&gt;
  </code></pre>