IIS 8.5不提供JS,CSS和图像文件(静态内容) [英] IIS 8.5 is not serving JS, CSS, and Image files (static content)

查看:471
本文介绍了IIS 8.5不提供JS,CSS和图像文件(静态内容)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在Windows 8.1上使用Update运行IIS。我们正处于Orchard CMS首次设置屏幕,IIS正在为所有静态内容提供401。我们已阅读以下内容无济于事:

We're running IIS on Windows 8.1 with Update. We're at the Orchard CMS first time setup screen, and IIS is giving 401s for all static content. We have read the following to no avail:

  • IIS 7.5 no images css js showing
  • IIS 7.5 no images css js showing
  • The official Orchard deployment documentation

基于这些,我试过不起作用


  1. 启用IIS功能以提供静态内容。

  2. 授予 IIS_IUSRS 读取,写入和读取权限执行。

  3. 授予网站的应用程序池权限,以读取,写入&执行。

  1. Turn on the IIS feature to Serve Static Content.
  2. Give IIS_IUSRS permission to Read, write & execute.
  3. Give the site's application pool permission to Read, write & execute.

什么可行?虽然是核选项:给每个人读取权限(除非我们要继续进行Orchard设置;然后我们需要为Everyone提供更多权限。)这使我相信我必须允许一些原则的范围小于每个人,但范围比IIS_IUSRS和应用程序池合并。

What does work though is the nuclear option: to give Everyone the Read permission (unless we want to proceed with the Orchard setup; then we need to give Everyone even more permissions.) That leads me to believe that I must give permission to some principle with less scope than Everyone but more scope than both IIS_IUSRS and the application pool combined.

谁/什么原则是什么?

我们收到了401. .. \ Themes \SafeMode \Styles\site.css

We receive a 401 on ..\Themes\SafeMode\Styles\site.css

任务管理器确认该网站是作为果园用户运行。

The task manager confirms that the site is running as the orchard user.

.. \ Themes \SafeMode\Styles\目录的安全属性为果园提供了读取权限。

The security properties of the ..\Themes\SafeMode\Styles\ directory gives Read permission to orchard.

为什么它只在我们给每个人的读取权限时才有效?

Why does it only work when we give Read permission to Everyone?

推荐答案

我遇到了类似的问题。在身份验证下,我右键单击匿名身​​份验证并单击编辑。这显示了一个对话框,使您能够设置匿名用户的身份。我将其设置为应用程序池标识,并为我解决了问题。

I had a similar problem. Under authentication, I right clicked "Anonymous Authentication" and clicked "Edit". That shows a dialog giving you the ability to set the identity of the anonymous user. I set it to "Application pool identity" and that fixed the problem for me.

这可能不是最安全的配置,但我在开发服务器上所以我不喜欢不在乎。

This may not be the most secure configuration though, but I'm on a dev server so I don't care.

这篇关于IIS 8.5不提供JS,CSS和图像文件(静态内容)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆