简体   繁体   English

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

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

i am playing around with Identity Server 3 for a project I am working on and i am trying to follow a tutorial I found here: https://www.scottbrady91.com/Identity-Server/Identity-Server-3-Standalone-Implementation-Part-1 我正在为正在研究的项目使用Identity Server 3,并且尝试遵循在这里找到的教程: https : //www.scottbrady91.com/Identity-Server/Identity-Server-3-Standalone-Implementation -第1部分

When running locally it works like expected but I want to deploy it to a web app in Azure. 在本地运行时,它可以按预期工作,但我想将其部署到Azure中的Web应用程序。 This is where I run into problems. 这是我遇到问题的地方。

I receive an error: 我收到一个错误:

    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.

Now I am trying to figure out if something is wrong with how I am setting up Identity Server or if I am not able to deploy something like this to a Web app in azure. 现在,我试图找出我设置Identity Server的方式是否有问题,或者是否无法将这样的内容以蓝色方式部署到Web应用程序中。 Unfortunately i can't find any logs anywhere to give me any hints. 不幸的是,我找不到任何日志可以给我任何提示。

My startup class: 我的入门班:

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
            });
        });
}

} }

According to your description, I followed the tutorial about how to use identityserver3 to provide authentication services to an MVC application and a Web API here to check this issue. 根据你的描述,我也跟着如何使用identityserver3提供认证服务的MVC应用程序和一个Web API教程这里来检查这个问题。 It could work as expected on local side. 它可以按预期在本地运行。 Then I just deployed the identityserver project (identity server hosting application and client web application) and Web API project to Azure web app, then I checked it could work, you could refer to my web app here . 然后,我刚刚将Identityserver项目(身份服务器托管应用程序和客户端Web应用程序)和Web API项目部署到Azure Web应用程序,然后检查它是否可以工作,您可以在此处引用我的Web应用程序。

I would recommend you could clone this git sample IdentityServer3.Samples > MVC Authentication and test it on your local side, then change the related Uris to your azure side and deploy to azure to narrow this issue. 我建议您可以克隆此git示例IdentityServer3.Samples> MVC身份验证并在本地进行测试,然后将相关Uris更改为天蓝色,然后部署到天蓝色以缩小此问题。

暂无
暂无

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

相关问题 将MVC 6网站部署到Azure会导致错误502 - Deploying MVC 6 website to Azure results in error 502 在Windows Server 2012上将字符串从C DLL返回到C#DLL时出现HTTP状态502错误 - HTTP Status 502 error when returning string from C DLL to C# DLL on Windows Server 2012 Azure 网站错误 502 - Azure Website Error 502 在Azure上打开注册页面时收到“ 502-Web服务器充当网关或代理服务器时收到无效响应”错误 - Get “502 - Web server received an invalid response while acting as a gateway or proxy server” error when opening register page on Azure 使用SQL Server 2014将项目部署到Azure时出错 - Error deploying project with SQL Server 2014 to Azure “/”应用程序中的服务器错误。 无法找到该资源。 (404) 将 WCF 服务部署到 Azure 应用服务时 - Server Error in '/' Application. The resource cannot be found. (404) when deploying WCF service to Azure App Service 部署到服务器时,VoiceXML UCMA错误 - VoiceXML UCMA Error when deploying to server Identity Server 4部署到Azure网站时无法正常工作 - Identity Server 4 not working when deployed to Azure Web Site 错误(502)错误的网关:当尝试使用WebChat通道访问Azure上部署的聊天机器人时 - Error (502) Bad Gateway: When trying to access chatbot deployed on Azure using WebChat channel 部署到Azure时,从命令行引发Http Status 500,从VS'17开始工作 - Deploying To Azure throws Http Status 500 when from Command Line and works when from VS'17
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM