2

I have an ASP.Net MVC 3 application that runs fine when I use the visual studio web server.

However if I change the project to use IIS the application runs but its fails to retrieve any script or stylesheet files, if I use the chrome developer tools it is retrieving them but they have a file size of 0kb.

They are the standard references that come with the default Razor MVC 3 project

Any ideas what in my local IIS is causing these files to come back blank? even if I browse to http://localhost/myproject/content/Site.css I still get a blank file and no errors server side.

I'm using Windows 7 and IIS 7 if that helps.

1 Answer 1

10

Found the problem, when I installed IIS I didn't tick the "Static Content" box under

Internet Information Services\World Wide Web Services\Common HTTP Features

I went back in to Turn windows features on or off, ticked this box and now it works.

Sign up to request clarification or add additional context in comments.

1 Comment

What a catcher! I struggled for hours, being misled by the fact that my app uses windows authentication, and I constantly thought it is an authentication issue! Well done, and thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.