Your client app is calling localhost
and it won't work.
Please set the correct value for this environment variable. In your case: it's https://onboarding2.azurewebsites.net/api/
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I hosted a React App on Azure but it is unable to fetch data from the API. I've also hosted the SQL database on Azure SQL backend and changed the connection strings on the Web App to match it. Why is the React App still unable to fetch data?
Failed to load resource: net::ERR_CONNECTION_REFUSED: https://freeimage.host/i/h7iI2f
WeatherForecastcontroller API is able to fetch data from hardcoded array: https://freeimage.host/i/h7i91a
This is my Fetch API source URI saved in .env file: https://freeimage.host/i/h7iOEg
https://onboarding2.azurewebsites.net/api/customers
Postman is returning data from API: https://freeimage.host/i/h7ssDB
Your client app is calling localhost
and it won't work.
Please set the correct value for this environment variable. In your case: it's https://onboarding2.azurewebsites.net/api/