MVC Web Api won't allow Windows Authentication

后端 未结 1 1535
广开言路
广开言路 2021-01-15 04:27

I have a simple MVC web api 2 IIS hosted application which I want to enable windows authentication (initially not using Owin). I am running this on my development machine an

相关标签:
1条回答
  • 2021-01-15 04:50

    If you read applicationHost.config, you will see that authentication related sections are locked down and cannot be overridden in web.config,

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

    Thus, you need to specify that in applicationHost.config, instead of web.config. Both IIS and IIS Express have such restriction.

    0 讨论(0)
提交回复
热议问题