Stephen__T
Stephen__T

Reputation: 2032

Static content not loading after deployment to IIS 7

I'm having a problem where my style sheets and images are not loading after I deploy my site to IIS. It works fine in visual studio and local IIS.

I think it is trying to authenticate the static content because the css sources are showing up as LogOn?ReturnUrl=%2fContent%2fstyle.css in Chrome inspector. If I inspect the source code of the css it is just my logon page.

I've ensured that the server is set to serve static files and the IIS user has access to all of the files.

I've also tried adding the following code to my web.config:

<authorization>
         <allow users="*" />
  </authorization>

I found this in a similar stack overflow question but it did not work.

Upvotes: 2

Views: 2051

Answers (1)

Stephen__T
Stephen__T

Reputation: 2032

I figured it out. I had to set Anonymous Authentication to use the app_pool identity.

Upvotes: 3

Related Questions