相关疑难解决方法(0)

身份服务器 4 Windows 身份验证

我结合了这三个资源来开始使用 Identity Server 4。

  1. IdentityServer4.Quickstart.UI
  2. 4_ImplicitFlowAuthenticationWithExternal
  3. Combined_AspNetIdentity_and_EntityFrameworkStorage

这三者的组合用于将用户存储在数据库中,甚至来自外部供应商。还存储 Identity Server 4 配置,例如声明、角色、客户端和资源。我现在的主要问题是在 IIS Express 中运行时 Windows 身份验证按预期工作。一旦我在本地机器上发布到完整的 IIS 服务器,当我点击 Windows 外部登录页面时,我会得到一个重复的登录弹出窗口。在 IIS Express 中运行 Identity Server 4 时,我没有看到该弹出窗口。在 IIS Express 中,我可以单击 Windows 外部身份验证按钮。它通过应用程序正确路由并成功完成登录。

任何和所有的帮助都受到高度赞赏。我试图包含尽可能多的复制步骤,所以如果有任何不清楚的地方,请告诉我。

重复登录弹出窗口:

在此处输入图片说明

IIS 设置为启用了 Windows 身份验证和匿名身份验证。

在此处输入图片说明

Setup.CS(ConfigureServices 方法)

public void ConfigureServices(IServiceCollection services) {
        // Windows authentication is supported only by hosting Kestrel (Asp.net Core Web Server inside iis as a reverse proxy)
        // It is different than other Authentication methods because you don't Add the Authentication middleware …
Run Code Online (Sandbox Code Playgroud)

iis windows-authentication asp.net-identity identityserver4 asp.net-core-2.0

5
推荐指数
1
解决办法
2546
查看次数