Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure App Service Returns Error - Error 403 - Forbidden The web app you have attempted to reach has blocked your access

I am getting error while accessing the Azure App Service, can you help in resolving the issue ?

What setting to be applied to resolve the issue ?

enter image description here

Thanks in advance.

like image 230
Sivalingaamorthy Avatar asked Sep 09 '25 19:09

Sivalingaamorthy


1 Answers

This error comes either

  • When the public access is not allowed on Azure App Service, if you have open public API.
  • The IP of your application with which you are calling the app service is not whitelisted.
  • If you have any gateway in between then that may also be blocking your calls.

Solutions to try:

  • Try removing the access restrictions from Networking page of your web app.

    enter image description here

  • Try giving the access to all by adding 0.0.0.0/0. Later you can add restrictions based on your requirements. enter image description here

  • The sequence of the restrictions matters, so please check that once. If you have any blocked call before any allowed call, then it may impact. enter image description here

  • You can also have restrictions based on http-headers like X-Forwarded-For. Please check that once. This can happen from code as well, based on how you handle the errors. Link

  • If your API is behind the Gateway, then you can check this: Application Gateway integration with service endpoints

like image 168
KushalSeth Avatar answered Sep 14 '25 07:09

KushalSeth