Wrong API Port is used by the Angular Frontend in default Template.

Author: baltermiaCreated Mar 26, 2026Updated May 14, 2026

Describe the bug The angular frontend uses its own URL as api-base-url instead of the web-apis actual url.

To Reproduce Steps to reproduce the behaviour:

  1. Create new Template dotnet new ca-sln --client-framework Angular --database postgresql
  2. Start the Aspire Host
  3. Try to register in the Frontend

The browser's log shows a 400 Error:

register.component.ts:33  POST http://webfrontend-nettest.dev.localhost:51539/api/Users/register 400 (Bad Request)

But when I try to access the <url>/api myself it's just a 404 Error.

The API/Scalar is on http://localhost:5098/scalar, so the URL seems wrong, no?

I have done no other configurations, only installing the default template for Angular.

Source: jasontaylordev/CleanArchitecture