How can I get asp.net core to serve an index.html file from inside my wwwroot?
The reason I want to do this is because I an developing an angular 4 app using the ang
Just use this in startup.cs
:
app.UseFileServer();
It's shorthand for:
app.UseDefaultFiles();
app.UseStaticFiles();
it avoids issues with having to have those in the correct order (as shown above)
I needed to declare UseDefaultFiles() before UseStaticFiles().
app.UseDefaultFiles();
app.UseStaticFiles();