Azure前端门错误404与应用服务后端

huangapple go评论68阅读模式
英文:

Azure front door error 404 with app service backend

问题

我有一个使用AAD身份验证的Web应用程序,部署在一个应用服务中。当我浏览应用服务时,它运行正常。我正在与Azure Front Door(经典版)一起验证其行为。但是,一旦我将Front Door部署为此Web应用程序的后端,它就开始出现404错误。

我正在浏览前端主机,它解析为mywebapp.azurewebsites.net/Home/Error

找不到网页 https://mywebapp.azurewebsites.net/Home/Error 的网页
HTTP错误404

此外,重定向URI设置如下:

https://mywebapp.azurewebsites.net/
https://mywebapp.azurewebsites.net/signin-oidc
https://myappfrontdoor.azurefd.net/
https://myappfrontdoor.azurefd.net/signin-oidc
https://localhost:{myport}/
https://localhost:{myport}/signin-oidc
英文:

I have a web application using AAD authentication and is deployed in a app service. It works fine when I browse the app service. I was verifying its behavior along with a azure front door(classic). But soon as I deploy front door with this web app as the back end it starts to give a 404 error.

I am browsing the frontend host and it resolves to mywebapp.azurewebsites.net/Home/Error

No webpage was found for the web address https://mywebapp.azurewebsites.net/Home/Error
HTTP ERROR 404

Also, redirect uri set up is as below:

https://mywebapp.azurewebsites.net/
https://mywebapp.azurewebsites.net/signin-oidc
https://myappfrontdoor.azurefd.net/
https://myappfrontdoor.azurefd.net/signin-oidc
https://localhost:{myport}/
https://localhost:{myport}/signin-oidc

答案1

得分: 1

我已创建了使用AAD身份验证的Web应用程序,并部署在类似以下的应用服务中:

Azure前端门错误404与应用服务后端

添加了与AAD身份验证相关的身份提供程序,如下所示:

Azure前端门错误404与应用服务后端

创建了与应用服务关联的Azure前端门户经典版,如下所示:

Azure前端门错误404与应用服务后端

在路由规则中选择接受的协议为HTTP和HTTPS,确保选择前端/域名,如下所示:

Azure前端门错误404与应用服务后端

现在,当我尝试浏览前端主机时,它成功解析,如下所示:

Azure前端门错误404与应用服务后端

Azure前端门错误404与应用服务后端

如果仍然出现错误:

  • 检查您的Web应用程序的身份验证设置是否正确配置。具体来说,请确保Azure Active Directory应用程序注册中的重定向URI与您在Azure Front Door中指定的URL匹配。
  • 当我尝试时,当使用RDP查看前端时,如果在登录帐户的情况下仍然收到相同的404错误,则经过一段时间后,连接将在常规浏览器中成功解析。
  • 确保路由规则应指定适用于您的Web应用程序的正确基于路径的路由规则。
英文:

I have created web application using AAD authentication and deployed in an App service like below:

Azure前端门错误404与应用服务后端

Added identity provider with AAD authentication like below:

Azure前端门错误404与应用服务后端

Created Azure front door classic with backend pool associated with app service like below:

Azure前端门错误404与应用服务后端

In routing rule select accepted protocol as HTTP and HTTPS Make sure to select Frontend/domain like below:

Azure前端门错误404与应用服务后端

Now, when I try to browse the frontend host it resolve successfully like below:

Azure前端门错误404与应用服务后端

Azure前端门错误404与应用服务后端

If still error persists:

  • Check that your web application's authentication settings are configured correctly. Specifically, make sure that the redirect URIs in your Azure Active Directory app registration match the URLs that you have specified in Azure Front Door.
  • When I attempted, I received the same 404 error when using RDP view the frontend while signed into the account it resolves successfully after a while, the connection is resolved in a regular browser.
  • Ensure that routing rules should specify the correct path-based routing rules for your web application

huangapple
  • 本文由 发表于 2023年5月17日 12:05:49
  • 转载请务必保留本文链接:https://go.coder-hub.com/76268489.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定