Call Protected APIs from a Blazor Web App

Hello,

Thank you very much for the tutorial. I retrieve your project and understand main steps. However, sometimes the first call of the external API returns 404. With the classic yellow message on the bottom of the page. And clicking to reload, everything works. I stop the debug mode of my blazor web app, restart and all seems to work.

I add a polly retry policy but it doesn’t work. If I restart the external API project, same behavior, the first call of the API returns 404 from Blazor project.

Is there any problem with the httpclient or you think it’s the render mode?

1 Like