Share via

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 | .NET | Blazor
Developer technologies | C#
Developer technologies | C#

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.

Developer technologies | ASP.NET Core | Other
Developer technologies | ASP.NET Core | ASP.NET API
0 comments No comments

Answer accepted by question author

SurferOnWww 6,016 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.

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

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