5

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?

Null Reference
  • 11,260
  • 40
  • 107
  • 184
  • Did you checked the path in the src attribute of the generated img tag?, also if you access directly this path in the web browser do the images show up? – Rafael Mar 05 '13 at 01:16
  • Glyphicons uses css sprite to render the icons.. so I can't do a "right click > view image location" – Null Reference Mar 05 '13 at 02:12
  • You still should be able to inspect the element and see the URL generated... – rae1 Mar 05 '13 at 04:16
  • Use the developer tools of your browser, hitting F12 bring them on most of them, then go to the element were you apply the CSS sprite and see the url that is being generated, then paste this url in your browser and see if the image shows up. – Rafael Mar 05 '13 at 19:59

2 Answers2

9

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:

Community
  • 1
  • 1
Rafael Fernandes
  • 505
  • 6
  • 10
4

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.

Community
  • 1
  • 1
janoulle
  • 1,888
  • 27
  • 29