SzepLaci
SzepLaci

Reputation: 41

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

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

The exact same commands are working perfectly on IIS 8, but I need this to work in IIS 7.5 too. What can be the problem?

Things I've already tried, and do NOT solves the problem:

[UPDATE]
This error comes up on multiple machines, running Windows 7 (32 and 64 bit too), even on a fresh install of Windows 7.

Upvotes: 4

Views: 8849

Answers (2)

theLaw
theLaw

Reputation: 1291

Try to put on web.config section this:

<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 solved for me

Upvotes: 2

Noah Sparks
Noah Sparks

Reputation: 1762

The error is generating from a misconfiguration in either web.config or applicationhost.config. It's mentioning protocol bindings so you're going to have to start trouble shooting the site bindings either through the gui or (more likely) manually editing the files. I'd start by comparing that section from a working site.

Upvotes: 0

Related Questions