HTTP Error 401.2 - Unauthorized for new site in a working app pool

霸气de小男生 提交于 2019-12-04 15:39:27

I figured it out. I had to add this to my applicationHost.config file (located in the windows/system32/inetsrv/config folder).

<windowsAuthentication enabled="true">
  <providers>
    <add value="Negotiate" />
    <add value="NTLM" />
  </providers>
</windowsAuthentication>

It was there for the other working application but not this new one.

On a recently built 2012R2 web server I kept running in to this error even for simple cases. I finally fixed it by reinstalling the Windows Authentication feature.

PowerShell:

Remove-WindowsFeature Web-Windows-Auth
Add-WindowsFeature Web-Windows-Auth
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!