I recently downloaded a demo of ASPBoilerplate using .NET 8, structured with MVC. Upon deploying it to shared hosting, an issue arises where the login page displays correctly with CSS styling. However, after logging in, all CSS styling ceases to function, resulting in a broken appearance resembling the attached screenshot.
Could anyone provide insights into why this CSS malfunction might occur specifically after login on shared hosting, despite functioning properly in other scenarios? Any suggestions or troubleshooting steps to rectify this issue would be greatly appreciated. Thank you.
I am deploying an application on shared hosting at mywindowshosting.com hosting provider. Deployment steps:
I have also created a dummy login for the test. Website: https://life-easy.co.in/Account/Login Username: ismcagdas@abcd.com Password: Admin@123
One additional point to mention is that I've recently configured out-of-process settings. The rationale behind this decision is that I have a premium plan with 1 GB of RAM, and both applications use different versions of .NET Core. One application is using version 5.0, while the newer one is using version 8.0. Consequently, I've set them to run out of process. Would this have any impact on the current scenario?
Just looking at your site - on your Home view there's only 1 css loaded (see attached screenshot) and it's missing the layout css which is why your site looks broken.
So a few points for your consideration:
runat="server"
and prefix them with the virtual web root path (~). For example:<link href="~/Styles/site.css" rel="stylesheet" type="text/css" media="screen" runat="server" />
Inspect your CSS files for any syntax errors or issues. Sometimes a single error can prevent the entire stylesheet from being applied.
Follow ASP.NET Boilerplate own conventions and structure. You might find this help page useful. https://aspnetboilerplate.com/Pages/Documents/Embedded-Resource-Files
Check ASP.NET Boilerplate samples on Github. It may provide you with many insights. https://github.com/aspnetboilerplate