net::ERR_CONNECTION_REFUSED Error in .NET Angular App - How to Resolve? [duplicate]

Discussão em 'Angular' iniciado por Saad Anwar, Julho 29, 2025.

  1. Saad Anwar

    Saad Anwar Guest

    enter image description hereI'm encountering a net::ERR_CONNECTION_REFUSED error while working with my Angular application integrated with a .NET backend. The issue occurs when I try to access certain resources or endpoints. Here's a detailed description of the problem:

    Application: Angular frontend (VS code) with a .NET backend (Web API) Environment: Local development environment Browser: Google Chrome Error Message: Failed to load resource: net::ERR_CONNECTION_REFUSED

    I have tried to add Cros in program.cs page CORS Settings: Ensured that CORS is correctly configured in the .NET backend to allow requests from the Angular frontend.

    Changed the port 4200 to 5200 Restarted the app

    Continue reading...

Compartilhe esta Página