IDS.Admin project CSS not loading giving error
1-Finance opened this issue · 1 comments
1-Finance commented
Describe the bug
Identity Server Admin Application gives error when we set ASPNETCORE_ENVIRONMENT variable other than Development.
It gives 404 error for path ==> https://localhost:44303/dist/js/bundle.min.js
To Reproduce
Steps to reproduce the behavior:
- Create a appsettings.otherthandev.json
- Run STS, API and ADMIN apps
- Open ADMIN in browser
Relevant parts of the log file
<log goes here>
1-Finance commented
It is resolved. If we want to serve the static assets from the nuget library then we need to add
webBuilder.UseStaticWebAssets();
inside
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.ConfigureKestrel(options => options.AddServerHeader = false);
webBuilder.UseStartup<Startup>();
})