How to connect a framwork with Net 6

osyris 236 Reputation points
2021-11-22T21:20:51.53+00:00

Im getting really confused with the latest update.
I am trying to connect Angular or React to asp net core
I know there is a Angular template but I want know how this works

so there is not much info in the program aside from Addcontrollers and the appControlerRoute
I copied everything from the Program.cs in Angular template to my empty Api template.

I also noticed that the spaService is now in the LaunchSettings.json
Profiles & IIT Express:
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.SpaProxy"
}

I have done the exact same thing, i have installed Angular And Called the map "ClientApp"
everything seems to be the same.
after i Run it it just show a error page and it sends me to "https://localhost:7130
wich is probably from "applicationUrl": "https://localhost:7130;http://localhost:5130", in the launchSettings.json

I tried to look up the asp net core document but could not find anything about Connection framworks like Angular
its very confussing I miss the old asp net core in my opion it was much better. but since its no longer supported i have no other choice

Can someone help figuring this out

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

6 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
    2021-11-24T15:44:57.33+00:00

    It is probably easier to create the combined project and compare.

    dotnet new angular

    The ClientApp folder should be the same as it uses the proxy settings. The c# project file should have the spa services nuget package and the spa settings.

    0 comments No comments

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.