Solution for Static Images and CSS Files Not Showing in IIS 7, 7.5, or 8

Few minutes ago a colleague and friend asked me about some problem he was having with ASP.NET themes. He was using a theme and including a CSS file in it, the CSS file was linked in the generated HTML but clearly it was not applied. Putting the URL of the CSS file in the browser address bar would return an empty result in Firefox, and a crappy DOCTYPE,HTML,HEAD,BODY tags in IE. The same website works normally with other developers running Windows XP or Windows 7.

Going further to the problem, I tried checking the file access, giving extra permissions and so on, checking web.config and global.asax for any ASP.NET HTTP Handler or HTTP Module that might be handling all requests. None of this existed. Then, I switched to IIS, trying to change the website from custom Application Pool to default integrated pipeline one to default classic (IIS 6 like) one, but no use.

Now I started thinking, images in the website didn’t show also! I didn’t know whether this was a DB/code issue or related to not showing the CSS, well, maybe something is wrong with IIS installation, right? Well, exactly!!!


Here’s what the problem was:


Having installed IIS 7.5 for the first time, the guy thought he just needed to choose ASP.NET features in WWW, he never realized he has to have “Static Content” checked as well. It was really funny when discovered!

Wouldn’t you agree?

Share With Friends:

P.S. Please help me out by checking this offer, then look below for a small Thank You.

How did I learn that?

As a bonus for coming here, I'm giving away a free newsletter for web developers that you can sign up for from here.
It's not an anything-and-everything link list. It's thoughtfully collected picks of articles and tools, that focus on Angular 2, ASP.NET 5, and other fullstack developer goodies.

  • Hi People
    How are you doing?

  • http://
  • Yeah, it happens a lot! This is the ugly side of being on a popular host like ASP.NET :s

  • romb

    Thanks ;) saved lots time for me

  • Ezequiel

    Great! that’s because when you click the parent item “Common HTTP Features” the item “Static Content” isn’t checked as default.

  • Lorenzo Peña

    Ey thanks for the tip. I spent like 1 hr trying to find out what was wrong with the setup of my application. This post made the deal.


  • KaL

    There goes something even more funny: I already did this and only one site don’t show CSS…

  • i just wanna thank you for sharing your this information and your site or blog this is simple but nice article I’ve ever seen i like it i learn something new today

  • Me too, I was into hour 3 when I got to this post, ow all is good, thanks a lot!

  • Thank you, usefull information.

  • really funny! this happened to me too.

  • Thanks a lot. i have this problem too. but with this tip solved problem. very great

  • Frank

    Thank you for this post

  • Chris Valdivia

    After 10 hours of flailing, I found this article. THANK YOU THANK YOU THANK YOU!!!

    — Chris

  • Nadal

    Still unable to view any css or images though the static content has been selected. On Windows 7 and IIS 7.5. Anyone has other suggestions?

    • Erik

      The other issue that can cause this, depending on your application, is if integrated pipeline mode is used instead of classic. If you have items requiring integrated, you can set them in your handlers with preCondition=”integratedMode”

  • Martijn

    Thnx, what a worthless manner to enable css (and javascript ?) Anyway, thnx for this post! It saved me a lot of time

  • Sdim

    100 recompilations, settings change, etc…

    10 hours lost trying to find the problem…

    One post to correct it!

    Thanks for the solution!

  • Sdim

    100 recompilations, settings change, etc…

    10 hours lost trying to find the problem…

    One post to correct it!

    Thanks for the solution!

  • Ali


    In my case this solution work perfectly

  • Rfc1459

    Thank you soooo much for this one! :D I’ve been trying to figure this one out for hours now. :S

  • Srikanth Portal

    Great..Its working now after this fix…

  • Just saved me a whole heap of time – thanks.

  • Guest

    Excellent. This fixed my css issue.

  • Emdad

    thanks. it solved my problem

  • Amine

    Thank you guy,
    I also lost 2 days seeking for the solution … thanks again…

  • Douglas McGregor

    I’m having this problem with all programming languages using IIS. All IIS features are checked, including Static Content. I’m a bit stuck on this just now.

  • Douglas McGregor

    Actually I’ve just solved my own problem. I had to put the full URL in the src bit, e.g.

  • Chris Craft


  • Cdavis

    Awesome, thanks for the fix!

  • Anon

    beautiful, you’ve just saved me the last of my hair ;-)

  • Kamranp


    i just made an application in IIS 7.5 localhost/clientrc but no images or css is applied. i followed this article but my static content was checked. website does not show images or any css. as for my windows 7 laptop it shows perfectly fine. any idea?


  • dcline97

    I had this exact problem – you saved my bacon – great work!

  • Anonymous

    Great advice. Thanks a lot !!

  • Blabla


  • paul york

    I’ve been googling and googling for a solution to a problem for a couple of days now (IIS not serving xml files) until I stumbled upon your site! Thanks for the insight – static content is now ticked and everything works! it’s a feature that I missed too.

    Best regards,


  • Mohamed – Your analysis here shows you are 1) an excellent “detective” and 2) not afraid to get into the “guts” of a server setup!

    My WordPress site is behaving just fine…except for one thing. The header area is about 20px too far to the left when viewed in a machine using Windows 7 OS. Win XP displays it the way it should be.

    Has Win 7 a different CSS code or has Win XP an inferior CSS code that needs a “hack” for this?

    The URL:

    Viewed OK on Dell Celeron XP Pro SP3 in browsers IE8, Firefox, Chrome
    Viewed Not OK on Dell Vostro 3350, Win 7 Pro in Browsers IE8, Firefox, Chrome

    Any help would be most appreciated. Thanks! –Greg
    My em: getgoodhelp (at) gmail (dot) com.

  • Dince

    hai … I’m using wamp server and Windows 7 64 bit

    i have a PHP Project which developed in Windows XPWhen i opened it in my PC, using Wamp Server and Windows 7
    the appearence looks totally different. 
    the code which linked to css wont show
    do u have any idea why that happens?

    • Dince

      PS: I have checked the Static Content

  • Dince

    hai … I’m using wamp server and Windows 7 64 biti have a PHP Project which developed in Windows XPWhen i opened it in my PC, using Wamp Server and Windows 7
    the appearence looks totally different. 
    the code which linked to css wont show
    do u have any idea why that happens?NB: I have checked Static Content i

  • Deepak

    Thank you very much. This worked for me… :)

  • zohaib

    just chk out the location where we publish the file sometimes the files doesnt have both images and css…Simply copy and paste the images and css this for me…here

  • Pingback: Web | Pearltrees()

  • Sky

    Thanks It worked for me, I was struggling with it for whole day

  • d

    wow…thank you!

  • vfrissora

    thanks for the post! saved me lots of time.

  • angry


  • Alfredo


  • taher

    huhu yes it funny problem
    thank you dear
    i solve my proble by checked static

  • Ashraf Ali

    I have already checked the static content but still getting not images in IIS7.Please help

    • kamal

      I am in Windows 8.1 Pro 64 bits with IIS8. I’ve tried all proposed solutions. and still doesnt work…..

      • Are you sure it’s not ASP.NET Bundling issue or something? Do you see errors in the console? If you see 404s in the console, double check the URLs to make sure they are correct. Also maybe it’s unauthorized (401) error instead of not found (404).

  • Sandy

    I did try this and it is still not working for me..any more suggestions.

  • Sihle Dube

    Thanks so much. After hours of going through sites, you blog helped me.

  • Marco Alves

    Hands up!!!!

  • Elangovan J

    Very Good. it was helpful. Thanks for the help

  • Jason

    Thanks! This saved me a lot of time!

  • Kinnar

    It really worked….. thanks a lot.

  • Bogdan Mart

    Wow! Thaks you for article! It saved my day.
    3 hours of frustration, reading answers about IIS users, but it’s just Static Content plugin!

  • Дима Петренко

    it’s work) Thanks!

  • Bill Kuhn

    Checking ‘Static Content’ worked for me in IIS on Win 8.1. Thank you!! Simply amazing that this would be disabled and hidden so deeply, but then again, it’s Microsoft and they are apparently trying to run people off their products.

  • Pingback: Zippykid |()

  • Mangal

    it is Really woks thanks you

  • Pingback: 2k mt coins()

  • Pingback: csgo()

  • Pingback: Google()

  • Pingback: tmj disorders Deltona()

  • Pingback: 11 piece dining set()

  • Pingback: Used car dealer()

  • Pingback: containers for sale prices()

  • Pingback: legitimate work at home jobs()

  • Pingback: personal ventas()

  • Pingback: figures()

  • Pingback: pet()

  • Pingback: Sports()

  • Pingback: friv()

  • Pingback: see this here()

  • Pingback: best hawaiian brand()

  • Pingback: organic kona coffee()

  • Pingback: mountain coffee classics()

  • Pingback: how to make quick money()

  • Pingback: gambling()

  • Pingback: vegetable garden tower()

  • Pingback: Piece Of Heaven()

  • Pingback: viagra()

  • Pingback: KALYAN MATKA()

  • Pingback: construction()

  • Pingback: Microsoft()

  • Pingback: instalar kodi addons()

  • Pingback: 福井脱毛()

  • Pingback: 福井脱毛()

  • Pingback: buy 1 million youtube views()

  • Pingback: Taxi Sankt Anton()

  • Pingback: 강남유흥()

  • Pingback: receive sms online virtual number()

  • Pingback: Jaydani()

  • Pingback: thread()

  • Pingback: BSM200GA120DN2 ()

  • Pingback: best 4k android tv box()

  • Pingback: life insurance lawyer()

  • Pingback: Best London theatre plays()

  • Pingback: best work from home jobs()

  • Pingback: downtown tampa magazine()

  • Pingback: افلام امريكية()

  • Pingback: oakleys cheap()

  • Pingback: kinds of flashlight()

  • Pingback: online mobile number to receive sms()

  • Pingback: satta matka()

  • Pingback: Turen()

  • Pingback: sativa()

  • Pingback: Premium visa service()

  • Pingback: cours de guitare()

  • Pingback: Buy Vps Deltona – Buy Cheap VPS()

  • Pingback: web design in pittsburgh()

  • Pingback: gourmet hawaiian coffee()

  • Pingback: gourmet hawaiian coffee()

  • Pingback: gourmet hawaiian coffee()

  • Pingback: gourmet hawaiian coffee()

  • Pingback: buy the worlds best gourmet coffee beans online today()

  • Pingback: gourmet hawaiian coffee()

  • Pingback: hydrochrome()

  • Pingback: Home Surveillance Florida()

  • Pingback: how to make a app()

  • Pingback: Home Automation()

  • Pingback: cat walk()

  • Pingback: Home Security()

  • Pingback: guides()

  • Pingback: awiz for love()

  • Pingback: read more()

  • Pingback: Sexy Fancy()

  • Pingback: Buy Vps Deltona – Buy Cheap VPS()

  • Pingback: live auction info()

  • Pingback: Cheap Crop Tops()

  • Pingback:

  • Pingback: swiss alps()

  • Pingback: real online jobs()

  • Pingback: Google()

  • Pingback: регистрация ооо Киев()

  • Pingback: photographer()

  • Pingback: web site()

  • Pingback: vigra()

  • Pingback: sex toys()

  • Pingback: black magic for love()

  • Pingback: home improvement ideas()

  • Pingback: Paul Boogeyman()

  • Pingback: Supplements()

  • Pingback: satta matka()

  • Pingback: SATTA KING()