我正在iis7上运行一个Django(1.8)应用程序(通过FastCGI),但是没有呈现css。我为静态内容授予了IIS\u IUSRS权限。我尝试了以下方法:
到目前为止,这些措施都没有奏效。除了css中没有样式之外,应用程序中的所有内容都正常工作。在chrome中运行应用程序时,出现以下错误:
Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://localhost:8080/static/autocomplete_light/style.css".
localhost/:76 Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://localhost:8080/static/css/jquery-ui.css".
localhost/:87 Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://localhost:8080/static/bower_components/bootstrap/dist/css/bootstrap.min.css".
localhost/:90 Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://localhost:8080/static/bower_components/metisMenu/dist/metisMenu.min.css".
localhost/:93 Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://localhost:8080/static/dist/css/timeline.css".
localhost/:96 Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://localhost:8080/static/dist/css/sb-admin-2.css".
localhost/:99 Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://localhost:8080/static/bower_components/font-awesome/css/font-awesome.min.css".
localhost/:102 Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://localhost:8080/static/w2ui-1.4.3/w2ui-1.4.3.min.css".
我可以通过允许
IUSR
帐户来解决这个问题。IIS_IUSRS
和IUSR
都必须有权限。若要添加IUSR
,请转到应用程序文件夹->;右键单击->;属性->;安全->;编辑->;添加->;并添加IUSR
帐户。帐户应具有读取和执行、列出文件夹内容和读取的权限。你知道吗添加此帐户后,静态内容(CSS和JS)开始工作。你知道吗
相关问题 更多 >
编程相关推荐