【问题标题】:HTTP error 502 when deploying simple Identity Server 3 to Azure将简单 Identity Server 3 部署到 Azure 时出现 HTTP 错误 502
【发布时间】:2017-09-21 13:20:36
【问题描述】:

我正在为我正在从事的项目使用 Identity Server 3,我正在尝试按照我在此处找到的教程进行操作:https://www.scottbrady91.com/Identity-Server/Identity-Server-3-Standalone-Implementation-Part-1

在本地运行时,它按预期工作,但我想将它部署到 Azure 中的 Web 应用程序。这就是我遇到问题的地方。

我收到一个错误:

    502 - Web server received an invalid response while acting as a gateway or proxy server.
There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.

现在我想弄清楚我设置 Identity Server 的方式是否有问题,或者我是否无法将类似的东西部署到 azure 中的 Web 应用程序。不幸的是,我在任何地方都找不到任何日志来给我任何提示。

我的创业班:

public sealed class Startup {
public void Configuration(IAppBuilder app) {
    app.Map(
        "/core",
        coreApp => {
            coreApp.UseIdentityServer(new IdentityServerOptions {
                SiteName = "Standalone Identity Server",
                SigningCertificate = Cert.Load(),
                Factory = new IdentityServerServiceFactory()
                        .UseInMemoryClients(Clients.Get())
                        .UseInMemoryScopes(Scopes.Get())
                        .UseInMemoryUsers(Users.Get()),
                RequireSsl = true
            });
        });
}

}

【问题讨论】:

    标签: c# azure azure-web-app-service identityserver3


    【解决方案1】:

    根据您的描述,我按照关于如何使用 identityserver3 为 MVC 应用程序和 Web API here 提供身份验证服务的教程来检查此问题。它可以在本地按预期工作。然后我只是将identityserver项目(身份服务器托管应用程序和客户端Web应用程序)和Web API项目部署到Azure Web应用程序,然后我检查它是否可以工作,您可以参考我的Web应用程序here

    我建议您可以克隆此 git 示例 IdentityServer3.Samples > MVC Authentication 并在本地测试它,然后将相关的 Uris 更改为您的 azure 端并部署到 azure 以缩小此问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-05-18
      • 2017-06-05
      • 1970-01-01
      • 2020-11-04
      • 1970-01-01
      • 2018-10-12
      • 2020-08-29
      • 1970-01-01
      相关资源
      最近更新 更多