Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've pointed my local IIS 7 to my local ASP.Net MVC project and everything is working fine except for the static content. Going to http://localhost:8080/Content/Site.css gives me a 404. I can see the folder on IIS Manager. Any ideas what might be wrong?

share|improve this question
add comment

3 Answers

up vote 3 down vote accepted

The problem was permissions. Even though when I create the IIS7 web site I told it to access the files as my user (it wouldn't work at all otherwise), for static file it was using the user of the application pool. Giving access to IIS APPPOOL\MyApplication to the folder where my project was fixed the issue.

share|improve this answer
add comment

I had to take the additional step of adding read permissions to the IUSR account as detailed in this post: http://forums.iis.net/t/1175217.aspx

share|improve this answer
add comment

Check your event logs and see if anything is getting spewed out there. It might give you more details about what the problem is.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.