Krishnaraj P
Krishnaraj P

Reputation: 33

How to convert existing Angular 14 project to Angular Universal 14 with .netCore Web API integration

I Want to convert the existing (ASP .net core 16 application with Angular 14) project to an ASP .net core application with Angular Universal 14

I know how ASP .net core application work with Angular 14 when we create a .net core project using an angular template, But I want to know the steps of how angular universal work with a .net core project

I am working on a .net core project using an angular template

enter image description here

This is the Project.csproj

enter image description here

this is Program.cs

enter image description here

CORS Policy Error when login from SSR Application

enter image description here

I have added <BuildServerSideRenderer>true</BuildServerSideRenderer> but not working and also added UseSpa and UseAngularCliServer middleware to the program.cs but I think something I have missed.

Some points about the problem which I have faced

  1. How to write code in a program.cs how to set middleware in the app.spa, spa.UseAngularCliServer

  2. How to run angular universal through the .net core project

  3. How APIs will work, how to integrate angular universal with .net core API, currently I am facing CORS policy Errors

I want to run my existing angular universal project with the .net core web API

Thanks in advance, your support will Appreciate

Upvotes: 1

Views: 188

Answers (0)

Related Questions