Orchard 1.4.2 : IIS 7 gives 500.19 on css

Topics: Installing Orchard, Troubleshooting
Jun 23, 2012 at 7:11 PM

IIS Express works fine with Orchard 1.4.2, but I prefer to use IIS 7.

IIS would load the site, but without any stylesheet information. When I browse to the css directly (/Orchard/Themes/TheThemeMachine/Styles/Site.css), IIS throws an exception:

This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".

This happens because the file '/Orchard/Themes/TheAdmin/Styles/Web.config' contains these lines:

    <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />

...yet my applicationHost.config contains this line:

<section name="staticContent" overrideModeDefault="Deny" />

What's the deal? Should I change this into "Allow"? Never had to manually edit the applicationHost.config before... Is there a way of changing this value in the IIS UI?


Jun 25, 2012 at 6:47 PM
Edited Jun 25, 2012 at 6:49 PM

Just a follow up for anyone who comes across the same problem...

Had some help on Twitter by @Sarkies_Proxy:


So it should be allowed by default. It's not on my machine (Vista with IIS 7, .NET 4, VS 2010, etc...).

I changed it to "Allow" and the css is loading correctly.

To make my Orchard installation debuggable in VS 2010, I also had to remove the line <httpErrors existingResponse="PassThrough" /> in the root web.config. Not sure why this was needed.