IIS not showing images and CSS

The problem:

I loaded a ASP.NET application on my Windows 7 IIS 7.5 installation. The code compiled fine but..

When I opened the website http://localhost/myapp it didnt show me any images or CSS. Only text on a blank page.

The solution for me was to install the “Static Content” support for IIS.

  1. Go to  “Turn Windows features on or off”
  2. Select Internet Information Services
  3. Select World Wide Web Services
  4. And check Static Content

Hope it will help someone :-)

This entry was posted in Programming, Tools, Windows and tagged , , , , , . Bookmark the permalink.
  • Rodrigo

    It Helped a lot!!

    Thank you very Much!!!

  • Shane

    Thank you so Much! I have been trying to figure this out for weeks!

  • tharinda

    Thanks..very hepful !

  • Mike

    Thank you! I just installed IIS locally for development and didn’t realize that static content was separate option.

  • Šalom

    Thanks! You saved my live and I can go to sleep :-)

  • Darron Kundla

    I am impressed with this website , rattling I am a fan .

  • http://no-website Amateur

    Hello,

    I’m facing this issue with windows server 2008 and iis 6.1, is there any soluation ?

    Regards

  • http://maxitjob.com Job Vermeulen (admin)

    I think the same solution should be possible.

  • http://no-website Amateur

    These options is not available in win-server 2008 with IIS 6.1

    1.Go to “Turn Windows features on or off”
    2.Select Internet Information Services
    3.Select World Wide Web Services
    4.And check Static Content

  • http://maxitjob.com Job Vermeulen (admin)

    Are you sure you have 6.1 on a Windows 2008? You should consider to install IIS 7.
    Also I think you should add static concept from the server roles, and then select services roles.

  • Alon

    I try that but it did not solved my problem that is the same :(
    any ideas???

  • http://www.bsss.com Neji

    God bless you. You just saved my job today. Thank you very much

  • Coder

    I’ve been biting my nails off this issue and your solution fixed my problems. Thanks!!!

  • Gav

    Worked a treat, thanks very much!

  • Eli

    Thanks a lot! It really helped me!

  • Dan

    Sweet, been wondering why that wasn’t working.

  • http://www.codesack.com Paras

    I got the same problem in case of IIS 7.5.
    I enabled the Static Content but still I m getting the same problem!!

  • http://maxitjob.com Job Vermeulen (admin)

    Try to reboot?

  • Micah

    This was awesome. Stupid IIS.

  • Martin

    Thank you a lot! This helped me.

  • http://asdf Test

    d

  • Marcelo

    Thanks. I’been trying since yesterday to figure this out!!!!!
    Works great.

  • joe

    How do you do this on WIn Server 2008?

    I have static content and styles not displaying.

    Joe

  • skumar

    Thanks a lot for this good post . It helped me great.

  • Henk De Groot

    Wow man, many thanks….a real life saver.

    To do this in windows 2008 R2, you need to go to the Server Manager.
    Then select Add Role Services.
    Now find the “Static Content” feature under the Webserver->Commen HTTP Features.
    Enable this and complete the wizard.

    Work for me and I can get some sleep now.

  • Vo

    Test

  • Mail

    This helped. Many thanks mate.

  • Rodrigo

    many thanks, it helped me a lot

  • Firemangreate

    i still have same issue, checked Static Content and rebooted.

  • big26

    thanks bro !!!!!!! 

  • Alfredo Cavalcanti

    Nice man! Thanks!

  • Wakok

     You’re da man!!

  • Martin

    Thank you, you put an end to hours of research.

  • William

     You put an end to 8-10 hrs of torture. First, I thought the web server wasn’t finding the images. Next (and more time-consuming) I was sure my images were corrupted in the file upload to the new hosting service. Later down the road, I heard and made sure Static Content was enabled in the IIS Manager to no avail. Only your comment re going into the Server Manager and installing Static Content worked. Thanks!!!!!!!!!!

  • el diablo

    Thanks, this is exactly what I needed!!