Base solution for your next web application
Open Closed

Hosting ASP.NET Core (.NET 8) + Angular (ASPZERO) in One Azure Web App #12440


User avatar
0
pliaspzero created

We are working with the ASPZERO v13.4 full-stack template and want to deploy both the Angular frontend and the ASP.NET Core 8 backend into one Azure Web App (App Service). The goal is to streamline deployment and hosting under a single domain. đź§© Stack Details

Frontend: Angular (ASPZERO-generated)

Backend: ASP.NET Core 8 (Web API + Identity)

Deployment Target: Single Azure Web App (App Service)

Hosting OS: (Windows or Linux—please advise)

âť“ Questions / Support Needed

Is this scenario fully supported in ASPZERO v13.4+?
Can both Angular and ASP.NET Core 8 run side-by-side on the same App Service instance, using standard publish pipelines?

What configuration is needed in ASP.NET Core 8 Startup (Program.cs)?
Should we use UseSpa() or UseStaticFiles() with Angular artifacts copied to wwwroot?

Are there changes needed in the Angular project?

    Do we need to modify baseHref or environment.prod.ts to match App Service routing?

    Any steps to avoid 404 on Angular routes when refreshing?

How should the *.csproj file be updated?

    Is there an official recommendation from ASPZERO on copying Angular build outputs to wwwroot during dotnet publish?

    Can this be automated in the backend project’s build pipeline?
Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

1 Answer(s)
  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi @pliaspzero

    ASP.NET Zero supports hosting Angular frontend and backend projects under a single Azure Web App. Deploying the solution as a single project simplifies the deployment process and makes maintenance easier. The Angular application can be served by copying the build output to the backend project's wwwroot directory.

    For more details, refer to the official documentation: https://docs.aspnetzero.com/aspnet-core-angular/latest/Deployment-Angular

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)