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?

link|improve this question

feedback

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.

link|improve this answer
feedback

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

link|improve this answer
feedback

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

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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