Response status code does not indicate success: 404 (Not Found)

Puneet Chandiok 20 Reputation points
2025-01-03T04:04:52.01+00:00

I get the following error while calling an api in my Blazor application:

User's image

Following is the code where the error is pointing:

User's image

And following is the calling api where request is made:

User's image

What went wrong here? Any suggestions?

Thanks,

Puneet Chandiok

Developer technologies ASP.NET ASP.NET Core
Developer technologies .NET Blazor
Developer technologies ASP.NET ASP.NET API
Developer technologies C#
0 comments No comments
{count} votes

Accepted answer
  1. SurferOnWww 4,706 Reputation points
    2025-01-03T05:55:45.67+00:00

    Please try using an absolute url such like http(s)://<hostname>/api/employees instead of relative url api/employees.

    Please note that if the api is located at a cross domain the server of the api must have CORS functionality.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.