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

Yardley Estiverne 40 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!

Developer technologies .NET Other
Developer technologies ASP.NET Other
0 comments No comments
{count} votes

Accepted answer
  1. Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
    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

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.