IIS 8.5 is not serving JS, CSS, and Image files (static content)

Shaun Luttin picture Shaun Luttin · Feb 9, 2015 · Viewed 30.4k times · Source

The problem

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:

Based on those, this is what I have tried that doesn't work.

  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.

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.

Who/what is that principle?

Pictures to show the problem

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

The task manager confirms that the site is running as the orchard user. The IIS website is running as the orchard app pool

The security properties of the ..\Themes\SafeMode\Styles\ directory gives Read permission to orchard. The orchard app pool has write permission not to mention read.

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

Answer

quack picture quack · Mar 24, 2015

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.

IIS Anonymous Authentication Credentials Dialog.

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