【发布时间】:2017-12-07 08:24:24
【问题描述】:
我已经遵循了这里的所有 IS4 教程,尽管没有一个教程强调如何在 prod 中使用 https 协议。我可能错过了一些东西,但是当我使用 https(使用我在 IIS 服务器上安装的证书)在 IIS 中部署我的 IS4 服务器时,我不能再调用tokenClient.RequestClientCredentialsAsync。如图所示,它只返回 Error=Unauthorised 和 ErrorType=Http:
我的 IS4 就是这样设置的
services.AddIdentityServer()
//.AddSigningCredential(cert)
.AddTemporarySigningCredential()...;
我也尝试过使用相同的 SSL 证书,但没有任何进展。
编辑(答案): 啊!我在部署的 IIS 站点上启用了导致该错误的基本身份验证,禁用它后,它按预期工作
【问题讨论】:
-
您是否可以浏览 https://
/.well-known/openid-configuration.if 任何错误 -
@RohithRajan 是的,我可以浏览到那个,没问题
-
你有运气吗?
-
这只是启用基本身份验证的问题,不久前我在答案中添加了一个编辑。不过感谢您的建议
标签: iis asp.net-core identityserver4