New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSS file not loading Core 3.0 #47
Comments
also for me the same problem, it is not loaded the stylesheet! |
To be more precises for 3.0, replace in Program.cs . public static IHostBuilder CreateHostBuilder(string[] args) => |
Hi! Same problem! Any solution? |
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
Hope this helps someone |
TOP ! |
another solution avoiding change the AllowSynchronousIO option is to intercept the stylesheet call and serve the static css file. in startup, in configure method use this (instead of simply app.UseElmah()): MyMiddleware is this:
where the path for redirect depend on where you put the static css file. |
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.
|
After 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
to run the project.
EDIT:
setting o.ConfigureKestrel(options => options.AllowSynchronousIO = true);
fixes the issue, but i am guessing is not a good solution
The text was updated successfully, but these errors were encountered: