How to fix vite error in Angular ASP.NET project?

Yardley Estiverne 20 Reputation points
2024-04-24T03:07:40.3233333+00:00

I have started my Angular ASP.NET project and ended up with the following error, just want to find out how to fix it:
Screenshot 2024-04-23 230508

Thank you!

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,398 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,273 questions
0 comments No comments
{count} votes

Accepted answer
  1. Bruce (SqlWork.com) 56,846 Reputation points
    2024-04-25T15:38:05.6266667+00:00

    either the webapi is not running, throwing an error, or not running on the expected port. check which port the webapi is running on, and hit the /weatherforecast url in the browser to verify. then in the angular project check the port number in vite.config.js. see server section:

            proxy: {
                '^/weatherforecast': {
                    target: 'https://localhost:7250/',
                    secure: false
                }
            },
    
    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful