We’re developing an aspnet core website with webapi backend all on a cloud platform. The auth part is implemented with openidconnect and cookies. Every tab is a new application to reduce release and test times. For the website / applications we have a razor class library that contains the main layout. See all posts in this series cloudnative
Debugging the application on localhost showed HTTP404 when loading the css and js files from the razor class library. Turns out we needed to configure UseStaticWebAssets when running on localhost. This is a feature that is set when the environment is development, but since we use localhost we had to include this code.
if(builder.Environment.IsLocalhost())
{
builder.WebHost.UseStaticWebAssets();
}