0

I have a site that looks fine when I run it in VisualStudio. However, I deployed the site to my production server and for some reason, the styles are not being applied. There doesn't appear to be any errors, missing resources, or permissions issues on the live server. I have been able to simulate the issue while running it in VisualStudio by commenting out the @Styles.Render("~/Content/css") line of code in my view. I'm not suggesting there is a problem with the line of code. I'm just saying if I remove the line of code, the styles aren't applied while debugging just like on the live server. The IP address to a very trimmed down version of the issue is http://69.2.50.212 if seeing the error will help. I wish I could provide more info but I really don't know what else to include.

ihatemash
  • 1,474
  • 3
  • 21
  • 42
  • Can you post the code, or at least a few lines showing reference to css and a line being affected? I had this problem on master pages and relative path and needed to do something special. Something along the lines of <%= ResolveUrl("~/css/default.css") %> – Anthony Horne Feb 10 '15 at 19:17
  • Anonymous user cannot access any pages *(home, about, contact)* including CSS. Did you place **authorization** tag inside **web.config**? – Win Feb 10 '15 at 19:18
  • 2
    If you use the F12 tools in IE, you see this in the console output: `CSS was ignored due to mime type mismatch`. This means that you do not have the .css type mapped to the proper mime type on the server. See http://stackoverflow.com/questions/16473610/internet-explorer-css-was-ignored-due-to-mime-type-mismatch-on-local-files-no – Erik Funkenbusch Feb 10 '15 at 19:21
  • Thanks Erik, I used F-12 but didn't see that. I'll see if that resolves the issue. – ihatemash Feb 10 '15 at 19:44

1 Answers1

1

This might be due to this problem. Images not loading through CSS on IIS7.5 MVC4

I found similar kind of error while inspecting your page. error

Community
  • 1
  • 1