0
pliaspzero created
Hi, is it possible to run Angular UI App and ASP.NET core API in IIS in one sub domain? What needs to be done / cheked for that?
1 Answer(s)
-
0
Hi,
Yes, this is possible. If you download a merged solution from aspnetzero.com website, it adds the below middleware into your Host applicaion. You need to place this right before static files middleware in your Startup.cs file.
app.Use( async (context, next) => { await next(); if (context.Response.StatusCode == 404 && !Path.HasExtension(context.Request.Path.Value)) { context.Request.Path = "/index.html"; await next(); } } );
After doing this, you just need to copy your Angular app's publish output to wwwroot folder of your published Host app.