Visual Studio配置Azure AD身份验证表示未配置Windows身份验证 [英] Visual Studio Configure Azure AD Authentication says Windows Authentication is configured when it isn't

查看:106
本文介绍了Visual Studio配置Azure AD身份验证表示未配置Windows身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在现有MVC网站上配置Azure AD身份验证. 因此,我右键单击Visual Studio中的网站,然后选择配置Azure AD身份验证".

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".

该向导然后说:在该项目中发现了不兼容的身份验证配置(Windows身份验证).该向导不能用于配置身份验证."

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

它甚至将我链接到文档页面解释错误.因此,我从web.config中删除了<authentication mode="Windows" />并重新构建了该应用程序.但是向导不断显示此消息.

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?

推荐答案

身份验证助手会直接在.csproj中检查身份验证部分和用于指示将Windows身份验证与IISExpress一起使用的行:

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>

确保删除web.config中的所有身份验证节点.然后卸载您的项目(在解决方案资源管理器中右键单击卸载").编辑项目文件(单击鼠标右键,然后单击编辑",然后将其卸载),并将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>

重新加载项目,重新生成,然后重新打开AD身份验证助手.

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

现在应该可以工作了:)

It should work now :)

这篇关于Visual Studio配置Azure AD身份验证表示未配置Windows身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆