IIS 7.5 "protocolMapping" cannot be read error in web.config

When I just want to simply open the web.config application file (IIS 7.5, Windows 7 x64) or make some changes to it using PowerShell commands, which do not have to do anything with the "protocolMapping" section, the following error: "Error:" the section "Protocol Configuration" cannot be read because the section declaration is missing. "

Exactly the same commands work fine on IIS 8, but I also need to work on IIS 7.5. What could be the problem?

Things I've already tried and DO NOT solve the problem:

  • Framework applicationPool running application installed on v4.0
  • also DefaultAppPool is set to v4.0 (however, the application has a separate applicationPool)

[UPDATE]
This error occurs on several computers running Windows 7 (32 and 64 bit), even with a new installation of Windows 7.

+4
source share
2 answers

Try adding the following to the web.config section:

<configSections>
  <sectionGroup name="system.serviceModel" type="System.ServiceModel.Configuration.ServiceModelSectionGroup, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   <section name="protocolMapping" type="System.ServiceModel.Configuration.ProtocolMappingSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
   </sectionGroup>
 </configSections>

This solution is for me.

+2
source

The error is generated due to incorrect configuration in the web.config or applicationhost.config file. He mentions protocol bindings, so you will have to start problems with setting up the website binding either through gui, or, more likely, manually editing the files. I would start by comparing this section with a production site.

0
source

Source: https://habr.com/ru/post/1570845/


All Articles