B.E. 2.6 CSS/images not displaying

Topics: ASP.NET 2.0, Themes
May 31, 2012 at 4:59 PM

I have deployed 2.6, using both the web package and by building and publishing the source from Visual Studio, to a shared hosting server. When I open the home page, or the other standard pages, it renders as plain text with no style or images displayed. Admin pages (settings etc) display with style applied, but without images.

Permissions seem to be set up correctly, I can create/edit posts/users etc. B.E. 2.5 previously worked perfectly on this on this same host (I just deleted all the files from that install and then uploaded the B.E. 2.6 files)

If I navigate directly to an image or CSS file, for e.g. /themes/Standard/theme.png, I get an error that just says "The page cannot be displayed because an internal server error has occurred.". No error seems to be logged in either the IIS logs or BlogEngine's own logger.txt.

If I delete the web.config file, or use a basic default one, then I can browse directly to CSS and image files, so the problem appears to be somewhere in there. I've tried commenting various bits out but haven't identified the exact entry causing the problem yet.

Any tips for how to troubleshoot this any better?

Jun 13, 2012 at 1:33 PM

I got a chance to look at this again today and solved it. The following section of the web.config seems to be incompatible with my hosting provider 

<staticContent>
        <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00" cacheControlCustom="public"/>
        <remove fileExtension=".ico"/>
        <mimeMap fileExtension=".ico" mimeType="image/x-icon"/>
    </staticContent>
I had read in the troubleshooting guide that the staticContent can be a problem, but when I looked at the web.config first I saw another staticContent section that was commented out, and then missed the one above.