Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Glyphicons shows up fine in development but not when hosted in IIS

I am able to view my icons just fine when during development, however after creating the deployment package using visual studio's build deployment package, and hosting it on my local (same PC) IIS7.5 server, the icons do not show up. I just get a blank box for all of them

I checked the path, the images are there.

I googled around, and found someone with the same issue he had, but he was hosting his web project on apache, so what he did was to chmod all his files and folders to 777.

I kinda did the same in IIS7.5, I granted my folders read/write access but they're still not showing up. I did this via Handler Mappings > Content View > Edit Permissions. I gave the folder that had the glyphicons.png full control for ALL users just to be sure.

Still nothing shows up. What else is there to check?

like image 416
Null Reference Avatar asked Mar 05 '13 00:03

Null Reference


2 Answers

I was looking for the same answer and for me, worked when I put the link directly to site.

Try to use the links provided at http://glyphicons.getbootstrap.com/ or just put these in your _Layout page:

  • <link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet">

  • <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>

  • <link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css" rel="stylesheet">

Here are some other related links to similar situations:

  • Font Awesome not working, icons showing as squares

  • http://www.seankilleen.com/2012/12/how-to-quickly-update-mvc4-project-with.html

  • Bootstrap and font-awesome in MVC4

like image 108
Rafael Fernandes Avatar answered Oct 12 '22 23:10

Rafael Fernandes


FYI, this method suggested on this other StackOverflow answer resolves the issue by setting the Build action on the .eot, .ttf, & .woff files to "Content" instead of the default value of "None". Doing this resolved my issue.

like image 26
janoulle Avatar answered Oct 13 '22 01:10

janoulle