Monthly Archives: February 2014

The configuration section ‘customErrors’ cannot be read because it is missing a section declaration – Azure

Hey everyone,

The configuration section ‘customErrors’ cannot be read because it is missing a section declaration

I started receiving this error after I added the following elements to my Web.config file:

  <customErrors>
    <configuration>
      <system.web>
        <customErrors mode="Off"/>
      </system.web>
    </configuration>
  </customErrors>

The problem turned out to be that the custom errors entry actually belongs under system.web. All you actually need to add it the <customErrors mode=”Off”/> part – just make sure it’s under system.web.

<system.web>
 
    <!-- Custom errors under system.web -->
    <customErrors mode="Off"/>
 
    <compilation debug="true" targetFramework="4.5" />
    <httpRuntime targetFramework="4.5" />
    <authentication mode="Forms">
      <forms loginUrl="~/Account/Login" timeout="2880" />
    </authentication>
    <pages>
      <namespaces>
        <add namespace="System.Web.Helpers" />
        <add namespace="System.Web.Mvc" />
        <add namespace="System.Web.Mvc.Ajax" />
        <add namespace="System.Web.Mvc.Html" />
        <add namespace="System.Web.Optimization" />
        <add namespace="System.Web.Routing" />
        <add namespace="System.Web.WebPages" />
      </namespaces>
    </pages>  
  </system.web>

Failed to register URL “http://10.X.X.X:11111″ for site “XXX” application “/”

Hey everyone,

I’ve just upgraded to Visual Studio 2013 and ran into the following while trying to run IIS express:

Failed to register URL “http://10.1.1.2:53034” for site “XXX” application “/”. Error description: Access is denied. (8×80070005).

The solution ended up being pretty obvious, I didn’t have permission. Run it with administrative privileges and the error goes away.