[英]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.