ASP.Net MVC和放大器;本地IIS问题加载样式表 [英] ASP.Net MVC & Local IIS Issue Loading Stylesheets
问题描述
我有,当我使用Visual Studio的Web服务器运行正常一个ASP.Net MVC 3应用程序。
但是,如果我更改使用项目IIS的应用程序运行,但其未能检索任何脚本或样式表文件,如果我使用Chrome开发者工具是获取他们,但他们有0KB的文件大小。
他们是来与默认的剃刀MVC的参考标准3项目
任何想法在我的本地IIS是导致这些文件回来空白?即使我浏览到 HTTP://localhost/myproject/content/Site.css 我仍然得到一个空白的文件,并没有错误服务器端。
我使用的是Windows 7和IIS 7是否有帮助。
发现问题,当我安装了IIS我没有勾选静态内容框
Internet信息服务\\万维网服务\\常见HTTP功能
我回到中启用Windows功能打开或关闭,打勾此框,现在它的作品。
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.
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.
这篇关于ASP.Net MVC和放大器;本地IIS问题加载样式表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!