0

Im using this in my web.config in my VS2019 project with IIS express on windows 10.

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

But I get this error

This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".

I looked at the internet to try different things, but none seem to work.

I've modified the files

  • C:\Users\me\Documents\project\.vs\config\applicationhost.config
  • C:\Users\me\Documents\IISExpress\config\applicationhost.config

I'm not sure what else to try.

Does anyone know?

omega
  • 40,311
  • 81
  • 251
  • 474
  • Possible duplicate of [Where is the IIS Express configuration / metabase file found?](https://stackoverflow.com/questions/12946476/where-is-the-iis-express-configuration-metabase-file-found) – Lex Li Oct 18 '19 at 01:33

1 Answers1

1

Figured it out, there was another file I had to edit

C:\Users\me\Documents\project\.vs\project\config\applicationhost.config
omega
  • 40,311
  • 81
  • 251
  • 474