简体   繁体   English

Windows 10 IIS无法加载样式表

[英]Windows 10 IIS does not load stylesheets

There are many post on web with regards to this problem, but none of them are working in my case. 关于此问题,网络上有很多帖子,但是在我看来,这些帖子都不起作用。 Recently I had to re-install IIS due to the problem caused by windows update. 最近,由于Windows更新引起的问题,我不得不重新安装IIS。 Javascript files and images are working fine, but stylesheets give me 404 error. Javascript文件和图像工作正常,但是样式表给我404错误。 When I open the stylesheet itself in browser I can see only blank page. 当我在浏览器中打开样式表本身时,我只能看到空白页。

Here is what I have checked: 这是我检查过的内容:

  • The .css MIME Type is set 设置了.css MIME类型
  • IIS_IUSRS has correct permissions IIS_IUSRS具有正确的权限
  • StaticFile Handler Mapping is enabled 启用了StaticFile处理程序映射
  • The stylesheet paths are definitely correct (existing project) 样式表路径绝对正确(现有项目)
  • Anonymous authentication is enabled and set to Application pool identity 启用匿名身份验证并将其设置为应用程序池标识
  • Removed staticContent section from web.config web.config删除了staticContent部分
  • Static Content is installed under Programs and Features 静态内容安装在“程序和功能”下

Note that I am trying to sort this problem on localhost, not the server. 请注意,我正在尝试在本地主机而不是服务器上解决此问题。

Any hints appreciated. 任何提示表示赞赏。

okay as it is really unclear about why iis does not load style sheets. 好的,因为iis为何不加载样式表尚不清楚。 I would recommend you to install fiddler (a web debugging tool ) and do a debug to see if your css file actually gets requested or not or are you receiving a 404 error . 我建议您安装fiddler(一个Web调试工具)并进行调试,以查看您的css文件是否真正被请求或是否收到404错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 带有 Windows 身份验证的 IIS 网站无法在本地 Windows 10 计算机上运行 - IIS website with windows authentication does not run on local Windows 10 machine .NET 4.6是否可在Windows 10的IIS上运行 - Does .NET 4.6 work on Windows 10's IIS aspnet 应用程序无法在 windows10/iis10 中加载非托管 dll - aspnet application unable to load unmanaged dll in windows10/iis10 .net core 2.1 Web应用程序可在Visual Studio中使用,但在Windows 10中部署到IIS时无法使用 - .net core 2.1 web app works in visual studio but does not work when deployed to IIS in windows 10 IIS在Windows 10的D分区上安装 - IIS install on Windows 10 on D partition 无法在Windows Server 2016 / IIS 10上获取IIS拾取目录 - Cannot get IIS pickup directory on Windows Server 2016 / IIS 10 .NET Windows控件的样式表 - Stylesheets for .NET Windows Controls 全新Windows 10安装-IIS 10-现有MVC应用程序无法正常运行 - Fresh Windows 10 Install - IIS 10 - Existing MVC App not working Windows Server 2012 R2 IIS中的XML序列化错误,但Windows 10 IIS中没有 - XML Serialization Errors in Windows Server 2012 R2 IIS, but not in Windows 10 IIS 在Visual Studio 2010和Windows 10中创建虚拟目录,IIS时出错 - Error creating virtual directory, IIS in visual studio 2010 and in windows 10
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM