CSS file not loading Core 3.0
See original GitHub issueAfter upgrading my project to the release of Core 3.0 the css file no longer loads and just returns an empty page.
I was able to reproduce this on the demo project in the repo just by upgrading it to core 3.0. I had to comment out
app.UseMvc(routes =>
{
routes.MapRoute(
name: "default",
template: "{controller=Home}/{action=Index}/{id?}");
});
to run the project.
EDIT: setting o.ConfigureKestrel(options => options.AllowSynchronousIO = true); fixes the issue, but i am guessing is not a good solution
Issue Analytics
- State:
- Created 4 years ago
- Comments:8
Top Results From Across the Web
Why are most of my CSS files not loading when using an ...
I am using ASP.NET Core 3.1. I have the following in every HTML file I will be using. <link rel="stylesheet" href="~ ...
Read more >Why js,css,lib didn't load from wwwroot?
I made a simple ASP MVC (Net Core 3.1) , I leave it as standard, and deploy it under a subfolder of the...
Read more >CSS file not loading on specific computer : r/HTML
Open the developer tools in the browser and go to the Network tab. Reload the page and watch for any 400 or 500...
Read more >Solving the React Error: Not Picking Up CSS Style
In this guide, you will learn about the errors that can occur while importing a CSS file into your React file.
Read more >Ojs not loading css - Software Support - PKP Community Forum
I'm trying to host ojs inside a digital ocean server, with nginx, but my css does not load and when I try to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had this same issue when using IIS so I do not think it is fully fixed. Instead of turning on SyncIO for the entire server you can combine the two above solutions and turn it off for specific requests.
I found this problem wasn’t solved by the keerthiraja1988’s code snippet when using IIS with the .net core 3 hosting bundle as kestrel doesn’t seem to be relevant. Instead this similar snippet worked for me in ConfigureServices in startup.cs
services.Configure<IISServerOptions>(options => { options.AllowSynchronousIO = true; });
Hope this helps someone