【发布时间】:2021-05-08 19:07:34
【问题描述】:
在本地,我有一组 Web 应用程序都可以通过一次登录访问。 为此,我采用了 Identity Server 4。
一旦应用程序发布在本地服务器上,无法远程访问,我通过 openssl 生成 SSL 证书并设置 IIS 以使用它。
特别是,我的机器可以通过本地 dns 访问。 比如我的机器ip:192.168.15.3,别名是app.server.lan
如果我连接到网站的主页 (app.server.lan),Google Chrome 会检测到该网站是安全的。 但是当我尝试访问应用程序然后启动应用程序和身份服务器之间的连接时,我得到一个错误页面,日志中显示以下错误:
2021-02-04 14:09:04.6785|1|ERROR|Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware|An unhandled exception has occurred while executing the request.
System.InvalidOperationException: IDX20803: Unable to obtain configuration from: '[PII is hidden]'.
---> System.IO.IOException: IDX20804: Unable to retrieve document from: '[PII is hidden]'.
---> System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
隐藏的 PPI 是:.well-known/openid-configuration,如果我通过浏览器检查,它是可见的。
我该如何解决? 我可以在没有 https 的情况下使用 IdentityServer 4 吗?
你看到黑线的地方是app.server.lan
5000 是身份服务器端口
443 是主应用程序端口
5001 到 5005 是其他应用端口
【问题讨论】:
-
身份服务器的地址是什么?不同端口同一个app.server.lan?
-
app.server.lan:5000
-
你能分享 iis 绑定吗?或者请使用 iiespress 应用程序!
-
添加图片到操作
-
我猜您的客户不喜欢您的自签名证书?最好获得真正的证书,例如使用 LetsEncrypt
标签: c# ssl iis certificate identityserver4