Hello @Rogelio Pérez Antonio , Thank you for reaching out.
if your Web app is hosted on ILB App Service Environment. Have you followed this documentation to set your environment up? You can also go through this document to understand various ways of integrating a web app with Azure Application Gateway.
If you have followed the above doc and are still facing the issue. Can you please provide more information/screenshots on the Web app and Azure application gateway configuration and error received?
Please let me know if there are any additional concerns. Thank you!