英文:
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应用程序,并部署在类似以下的应用服务中:
添加了与AAD身份验证相关的身份提供程序,如下所示:
创建了与应用服务关联的Azure前端门户经典版,如下所示:
在路由规则中选择接受的协议为HTTP和HTTPS
,确保选择前端/域名,如下所示:
现在,当我尝试浏览前端主机时,它成功解析,如下所示:
如果仍然出现错误:
- 检查您的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:
Added identity provider with AAD authentication like below:
Created Azure front door classic with backend pool associated with app service like below:
In routing rule select accepted protocol as HTTP and HTTPS
Make sure to select Frontend/domain like below:
Now, when I try to browse the frontend host it resolve successfully like below:
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论