Tuesday, 30 July 2013

This configuration section cannot be used at this path error in IIS 7.5

You would get this error when you configure Authentication mode by web config file or programmatically.By default in IIS 7.5 Microsoft has locked down the parent security requiring that you explicitly allow certain permissions to be overridden. I received the following alert in IIS 7.5 when my web.config file had Anonymous Authentication turned disabled and Windows Authentication turned enabled.


Configuration in my web config file

<system.webServer>
    <security>
      <authentication>
        <anonymousAuthentication enabled="false" />
        <windowsAuthentication enabled="true" />
      </authentication>
    </security>
</system.webServer>

After hosting my application in IIS, I am getting the below error message.


To resolve this issue by applicationHost.config you need to follow the below steps

1.Open the applicationHost.config  which is placed in the directory C:\Windows\system32\inetsrv\config\.
2.Look through the xml and change the overrideModeDefault tags from Deny to Allow for the sections overrideModeDefault and windowsAuthentication. 

<sectionGroup name=”authentication”>
   <section name=”anonymousAuthentication” overrideModeDefault=”Allow” />
   <section name=”basicAuthentication” overrideModeDefault=”Deny” />
   <section name=”clientCertificateMappingAuthentication” overrideModeDefault=”Deny” />
  <section name=”digestAuthentication” overrideModeDefault=”Deny” />
  <section name=”iisClientCertificateMappingAuthentication” overrideModeDefault=”Deny” />
  <section name=”windowsAuthentication” overrideModeDefault=”Allow” />
</sectionGroup>



Thanks,
Morgan
Software Developer


Advertisements
Advertisements

No comments:

Post a Comment