HTTP Error 500.19 - Internal Server Error - System.webServer / HTTPErrors missing section declaration

I have the following:

<system.web> <compilation debug="true" targetFramework="4.5"/> <httpRuntime targetFramework="4.5"/> <customErrors mode="Off"/> </system.web> 

and:

 <system.webServer> <handlers> <remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit"/> <remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit"/> <remove name="ExtensionlessUrlHandler-Integrated-4.0"/> <remove name="OPTIONSVerbHandler"/> <remove name="TRACEVerbHandler"/> <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"/> <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"/> <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"/> </handlers> </system.webServer> 

When I run my application, I get an error page:

 HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid. Detailed Error Information: Module CustomErrorModule Notification SendResponse Handler Not yet determined Error Code 0x80070490 Config Error The configuration section 'system.webServer/httpErrors' cannot be read because it is missing a section declaration 

Can someone help explain this to me.

I thought that I did not need to have a dedicated error page. However, everything I read tells me that the solution is to add a custom error page.

+7
asp.net-mvc asp.net-mvc-4 asp.net-mvc-5
source share
2 answers

In the hope that the following answer will help someone later, I will share my experience with this problem.

This error may appear for various reasons. Recently, I encountered an error for the following reasons:

  • Missing URL rewrite module.

My Web.config file contains a <rewrite></rewrite> section, which requires the Rewr IIS URL module to be installed (this can be done using the web platform installer).

  • Update Azure SDK.

My Web.config file contains the following entry:

 <system.diagnostics> <sharedListeners> <add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=2.3.0.0, Culture=... PublicKeyToken=..."> 

After updating the Azure SDK (2.3.x β†’ 2.6.x), this β€œhard” dependency on version 2.3.x could not be resolved. To solve this problem, I completely removed the Version element (including Culture and PublicKeyToken ), since the dependency on the latest version of the assembly is fine in my case.

+9
source

I had to remove the WindowsAzure.Diagnostics link from my web project (also contained an exclamation point) and add it again to version 2.7. After that, the problem did not occur

0
source

All Articles