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.
- https://digitaldrummerj.me/iis-express-windows-authentication/
- https://mpituley.wordpress.com/2016/10/04/http-error-500-19-in-the-iis-express/
- Config Error: This configuration section cannot be used at this path
- Config Error: This configuration section cannot be used at this path
- Config Error: This configuration section cannot be used at this path
- IIS Config Error - This configuration section cannot be used at this path
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?