Relative Content

Tag Archive for reactjs.nettypescriptminimal-apis

React with .NET 8.0 + Minimal api, frontend sends http requests to its own port instead of backend port

Previously I was working with react projects on .NET 3.1, and I just tried to create a fresh project on .NET 8.0 and encountered a lot of troubles and misunderstandings. I created a new controller and now trying to access it method, but I get the error 404 Not Found. I found out that frontend is trying to send requests to its own port instead of backend port. When I press “Run”, my project starts in two windows: one is google chrome that represents backend, I guess, and one in edge where frontend is. So, in the google chrome window the link is http://localhost:5239/ and in edge the link is https://localhost:5173/ which is also uncommon to me.