Visual Studio Configure Azure AD Authentication says Windows Authentication is configured when it isn't

谁说我不能喝 提交于 2019-12-12 04:10:01

问题


I want to configured Azure AD Authentication on an existing MVC website. So I right-click the website in Visual Studio, and select "Configure Azure AD Authentication".

The wizard then says: "An incompatible authentication configuration was found in this project (Windows Authentication). The wizard cannot be used to configure authentication."

It even links me to the documentation page explaining the error. So I removed <authentication mode="Windows" /> from web.config and re-built the application. But the wizards keeps showing this message.

What needs to change so the wizard will proceed?


回答1:


The authentication assistant checks for both authentication section and a line that indicates to use Windows authentication with IISExpress, in the .csproj directly:

<IISExpressWindowsAuthentication>enabled</IISExpressWindowsAuthentication>

Make sure to remove all authentication nodes in the web.config. Then unload your project (right click unload, in the solution explorer). Edit the project file (right click, Edit, once unloaded) and mark IISExpressWindowsAuthentication as disabled:

<IISExpressWindowsAuthentication>disabled</IISExpressWindowsAuthentication>

Reload your project, rebuild and then reopen the AD Authentication assistant.

It should work now :)



来源:https://stackoverflow.com/questions/36934908/visual-studio-configure-azure-ad-authentication-says-windows-authentication-is-c

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