簡體   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