asp.net - "Adding sign-in with Microsoft"示例在我的工作 VDI 上不起作用

标签 asp.net asp.net-mvc azure iis azure-active-directory

大家好!

背景:我有旧版 ASP.NET MVC 本地应用程序在本地 Windows IIS 上运行。我正在研究将此应用程序与 Azure AD 身份验证集成的方法。据我所知( Windows IIS integration with Azure AD ),不可能直接执行此操作,因为只能在应用程序级别添加 Azure AD 身份验证。因此,我正在考虑集成 MSAL 库之一来添加 Azure AD 身份验证。

使用本 Windows 手册 ( Quickstart: Add sign-in with Microsoft to a web app ),我从本学习页面下载了示例 Windows 应用程序 ( ASP.NET code sample ),并尝试在我的 Azure 虚拟工作机(基于在VDI平台上)。

并且 Azure AD 身份验证不起作用。当我单击启动应用程序页面上的“使用 Windows 登录”按钮时,我得到 the error :

Server Error in '/' Application.The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

Requested URL: /login.aspx

此示例在我的本地笔记本电脑上运行良好,状态完全相同。我建议任何安全实用程序都可能是原因,但我不知道如何检查它。我无法在我的工作机器上禁用安全应用程序,也许网络级别有任何限制我什至一无所知。

有人可以建议任何方法来解决这个问题吗?或者也许还有办法找到这个问题的原因?

提前谢谢您!

最佳答案

通过添加解决了问题

<authentication mode="None" />

到 web.config 文件中的 部分。

非常感谢TengFeiXie为我提供了有用的链接。

关于asp.net - "Adding sign-in with Microsoft"示例在我的工作 VDI 上不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/75507215/

相关文章:

asp.net - Moodle SSO 使用 asp.net 网络应用程序

asp.net - 如何通过 HTTP 和 HTTPS 协议(protocol)发送 xml 文件并取回结果

asp.net-mvc - 在 MVC 中清除页面上的文本框字段

azure - 将证书从 key 保管库上传到应用服务

javascript - onchange 事件不起作用

html - 如果我的用户没有我的网站使用的字体,他们如何自动下载它?

jquery - 从数据库与文件系统中检索静态数据

c# - ASP.NET MVC Html Helper 用法

java - 如何使用 JAVA 以编程方式为事件中心创建消费者组?

azure - 错误: Azure Logic App is throwing error to read Azure Blob Storage | Status 400 - The specifed resource name contains invalid characters