26

I have a problem in IIS whereby I have installed a web applcation that runs using .NET but when you navigate to it none of the images are displayed and the CSS is not being used, so the page is completely unformatted.

I am stumped by this but I was wondering if it could be something to do with permitted MIME types, so was going to check which ones were permitted when i noticed tghat the MIME types option is not present.

I can see it in IIS on another server in the IIS section when you click on a site, but it is just not present on this server. Does anyone know:

a) Why it is not there and how you can get it back b) If it could be the cause of the problem whereby the CSS is not detected and no images are shown?

I hope that I've explained this properly but will be happy to provide any more information to anyone that is happy to help!! :-)

Thanks

5lovak
  • 391
  • 1
  • 3
  • 8

3 Answers3

47

To solve the missing (blank CSS) and image issue, you need to install the Static Content Role.

  1. Start -> Administrative Tools -> Server Manager
  2. Select Web Server under Roles
  3. Third option down is Static Content under Common Http Features
  4. Install it

Your static content will now be served.

If you need to add specific MIME types then you can use the newly installed MIME Types feature. The new Role will not be shown until you restart IIS Manager.

Rebecca
  • 12,888
  • 10
  • 84
  • 127
  • 28
    And if you're on a non-server OS like Windows 8, do a search on the start page for "Turn Windows features on or off," and enable Internet Information Services -> World Wide Web Services -> Common HTTP Features -> Static Content – Phil Feb 08 '13 at 15:13
10

This is the answer for non-server users, I have Windows 10 and the comment of Phil (see answer below) worked for me:

"And if you're on a non-server OS like Windows 8, do a search on the start page for "Turn Windows features on or off" and enable Internet Information Services -> World Wide Web Services -> Common HTTP Features -> Static Content"

Feature settings screenshot:

Windows 10 Features Screenshot

SaschaM78
  • 4,104
  • 3
  • 31
  • 38
Omar Isaid
  • 444
  • 4
  • 12
0

OK, under IIS manager on W2k8 I see MIME Types under "HTTP Features". If you don't see the MIME Types configuration option, then you may need to follow Junto's steps in the answer above to install support for static files in IIS.

See enter image description here

Shannon Wagner
  • 351
  • 7
  • 25
BugFinder
  • 16,027
  • 4
  • 35
  • 49