I’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