'Azure App Gateway - Backend Health 404 error

I am trying to configure Azure Application Gateway with ADFS. The Backend pool points to ADFS Web Application Proxy. The backend health check is reporting as unhealthy. I am getting an a error: received invalid status code 404 in the backend servers http response

Everything appears to be configured correctly and I can access the site when bypassing the App Gateway



Solution 1:[1]

This was resolved by re-configuring the health probe

Solution 2:[2]

In my case with the App Service as a backend pool, I had to create a custom Health probe(http-probe for ex.) to be used in the HTTP setting(http for ex.), where the HTTP setting(http for ex.) is the one configured in the Request Routing Rule. enter image description here

enter image description here

enter image description here

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Omar
Solution 2 Montaro