繁体   English   中英

将简单的Identity Server 3部署到Azure时出现HTTP错误502

[英]HTTP error 502 when deploying simple Identity Server 3 to Azure

我正在为正在研究的项目使用Identity Server 3,并且尝试遵循在这里找到的教程: https : //www.scottbrady91.com/Identity-Server/Identity-Server-3-Standalone-Implementation -第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的方式是否有问题,或者是否无法将这样的内容以蓝色方式部署到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
            });
        });
}

}

根据你的描述,我也跟着如何使用identityserver3提供认证服务的MVC应用程序和一个Web API教程这里来检查这个问题。 它可以按预期在本地运行。 然后,我刚刚将Identityserver项目(身份服务器托管应用程序和客户端Web应用程序)和Web API项目部署到Azure Web应用程序,然后检查它是否可以工作,您可以在此处引用我的Web应用程序。

我建议您可以克隆此git示例IdentityServer3.Samples> MVC身份验证并在本地进行测试,然后将相关Uris更改为天蓝色,然后部署到天蓝色以缩小此问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM