1

I've got an IIS8/Windows 2012r2 server that is currently running a few sites (perfectly well with no issues).

I'm adding a new site that needs to have restrictions to all but a few IP addresses.

I've got the procedure sorted, have added the relevant IIS restriction role, added the first of the IP addresses to allow access, but as soon as I try to edit the feature settings to Deny unspecified clients, I get the following:

There was an error while performing this operation.

Details:


Filename:\\?\D:\path-to-website
Error: The configuration section
'system.webServer/security/dynamicIpSecurity' cannot be read because 
it is missing a section declaration

I've done searches both on here and a general Google search for the error, but nothing really comes up (talks more about .NET apps, and has a slightly different message).

This is a completely new site, only just created, completely devoid of any files in the web root.

I have also tried on the other sites that are running on the server, and they come up with the same error.

Unfortunately I can't really test it on another machine just yet as the other IIS based servers I've got are IIS7/Win2k8r2.

  • Open the file `C:\Windows\System32\inetsrv\config\schema\IIS_schema.xml` and search for `dynamicIpSecurity` it should be in there once. – Peter Hahndorf Oct 13 '16 at 17:38
  • It is - can't see anything wrong with it either. The weird thing is that i'm not trying to do anything with Dynamic restrictions - just straight IP restrictions. – Leigh Jepson Oct 17 '16 at 11:31

1 Answers1

1

Here's what worked for me. Open the file:

C:\Windows\System32\inetsrv\config\applicationHost.config

locate the "webServer" section and the "security" one under it

<sectionGroup name="system.webServer"> 
     ...
     <sectionGroup name="security">

and add the following element under it:

<section name="dynamicIpSecurity" overrideModeDefault="Deny" />

After that I was able to set up dynamic IP security using IIS Manager.

wruckie
  • 678
  • 6
  • 22
mistika
  • 111
  • 3