Skip to content

[WinAuth] Clarify app configuration and deployment #12144

@bdlane

Description

@bdlane

Adding the web.config with the authentication elements causes a configuration error at runtime.

Starting from the 'Web Application' template in the new project dialog in Visual Studio 2019, with Windows Authentication enabled, I can run and debug the project fine.

Then, following the steps outlined in the 'Development side configuration with a local web.confg' section (i.e. adding a web.config file with the <system.webServer><security><authentication> tags), running the project returns a HTTP 500.19, with the following config 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".

You can fix the problem by modifying the applicationHost.config file in the solution's .vs directory to unlock the relevant sections. However,

  1. this step isn't described in the docs, and
  2. this can't be right, can it? The applicationHost.config file is auto-generated (by VS?), so might get overwritten, and will need to be done on every developer's machine.

Is this the expected behaviour?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions