Yesterday, I faced a wired yet crazy issue. My machine has a bit freshly installed windows 7 and so while running web site hosted on local IIS, I was getting a pretty plain asp.net pages without CSS and Images being loaded properly.
After a little investigation, it appears to be a problem with Windows feature installation. All you have to do is run ‘optionalfeature’ command and make sure ‘Static Content’ option is checked.
Hope this would help you, if you face similar kind of issue.
17 Comments
Anonymous · April 3, 2012 at 11:19 am
Thanks a bunch!
I had the same problem here.
Anonymous · June 22, 2012 at 2:53 pm
Works well, also in Win2008r2 Enviroment(Server Manager)!
Thx!
Anonymous · September 14, 2012 at 1:42 pm
After a billion complex answers, this was the one – and I’d not gone back to check what needed installing, silly me!
Anonymous · November 20, 2012 at 10:54 am
Spot on. All other articles wasted time!
Anonymous · December 4, 2012 at 11:57 am
Good job! I spent a lot of time trying to solve this problem.
Congratulations!
Anonymous · December 20, 2012 at 4:49 am
worked great! you saved me a reinstall!
Sriniwas · May 13, 2013 at 4:02 am
Did Work!!! Solution…exactly what I’m looking for. Thank you.
Deepak Khemchandani · May 30, 2013 at 6:59 am
thnks dude!! god bless uu…
Usman Ali · June 10, 2013 at 7:02 am
Thanks g! Adil bhai, its working.
mithun khatri · July 20, 2013 at 3:05 pm
Static content is checked.. but still facing the same problem..
help!!
elie · July 21, 2015 at 12:49 pm
hello,I’m having the same problem. Did you found a solution ?
hamza · January 25, 2014 at 5:27 pm
thank you a lot man ,Good job dude !!!!
safdar · February 27, 2014 at 6:48 am
thank you so much.. i was looking the same problem
Sivalingaamorthy Subramaniam · June 4, 2014 at 12:17 pm
Thanks, this solved my problem.
Eurico Sapalo · August 9, 2014 at 5:25 pm
thank you so much.. i was looking the same problem and this helped me
kuralew · March 28, 2015 at 12:04 am
Thanks man.
css - C#/IIS/MVC: Static Conetent not loading on different environments - c++ · January 17, 2016 at 7:47 am
[…] looked @ static content alternative in iis, seen here: https://www.adilmughal.com/blog/2011/11/iis-7-not-loading-css-and-image/ it’s iis-wide alternative rather […]