开发者

ASP.Net MVC & Local IIS Issue Loading Stylesheets

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 开发者_JAVA技巧side.

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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜