Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

New deployed Azure web app is returning 404 Error code [closed]

I have deployed an ASP.NET Core Web API project using terraform. I can see it has been deployed successfully and the web app service is running. When I browse to the link it returns 404. I was wondering if i can get help on identifying why I am getting 404 error code when it has deployed successfully. I am using the FREE Azure subscription in case it makes difference. Link: https://tigrinyadictionary-api.azurewebsites.net/ enter image description here

like image 298
kiflay Avatar asked May 11 '26 18:05

kiflay


2 Answers

Since there is no startup page on web api project, that is why you are getting this error. Let me explain. Ihave created default asp.net web api having weatherforecast. If you run that in your local environment, you will face the same issue of "Resoure not found" as shown in below image.

404 Error enter image description here

Now, if I just append the weatherforecast at the end of the URL, it will start working as shown below:-

Data is shown enter image description here

Above is true for the Azure Deployment as well. I have deployed the same web api on azure, as azure app service and it is showing 404 as shown below:-

Again 404

enter image description here

Now add weatherforecast at end and it will start working and 404 will gone as shown below:-

Data is shown: enter image description here

like image 200
Shahid Riaz Bhatti Avatar answered May 14 '26 10:05

Shahid Riaz Bhatti


Remove this configuration WEBSITE_RUN_FROM_PACKAGE in Azure Portal fixed my issue:

Azure Configuration setting

like image 43
Chris Jay Avatar answered May 14 '26 08:05

Chris Jay