0

I'm developing a very simple website in ASP.Net Core 1.1, and all of the changes that I had made to the CSS settings are loaded correctly when I run the site in IIS Express. So I decided I needed a hosting environment so that I can show my client the site, and purchased an Azure account. Now, after publishing the site to Azure, the site looks like this. It's apparent that the CSS styles are not loading and I cannot figure out why.

I've tried the suggestions from here, and here and haven't had any success. Deleting the _.min.css files hasn't helped and my project doesn't even have a BundleConfig.cs file so I'm not sure where to put the BundleTable.EnableOptimizations code. Any help would be appreciated.

P.S.: The Azure hosting was primarily for me to send the link to my client for him to see the site and also for a few other test purposes. It will not be the production environment. Is this an issue specific to Azure? If so, then is it safe to say that I won't have this issue with another web host?

CryptoChrisJames
  • 53
  • 1
  • 2
  • 12
  • Hi, welcome to stack overflow. Please refer the [ask] link for more details on how to ask a question and update your question accordingly. Use the F12 tools in your browser to gather more information for example. – Jeroen Heier Oct 31 '17 at 04:51
  • How are you referencing your CSS? Is it published to the location you expected (and is the file _actually_ there?). – rickvdbosch Oct 31 '17 at 07:45

1 Answers1

0

So, I was told that Azure and IISE were referencing two different things. Sure enough, Azure was pulling from site.min.css while IISE was pulling from site.css. After searching for the reason behind this I stumbled upon this article on bundling and Minification, and followed the instructions starting at “using bundling and minification in a project.

After the build, I redeployed to Azure and the site worked fine. Azure is still pulling from site.min.css, so I’m still not sure whether or not that’s part of the problem. But the bundling extension seemed to fix everything up.

CryptoChrisJames
  • 53
  • 1
  • 2
  • 12