No Images or CSS after deployment - General Discussions - General Discussions - Progress Community
 General Discussions

No Images or CSS after deployment

  • No Images or CSS after deployment
  • Hello everyone -

    I'm working with SF support on this, but not getting very far and I need to get this resolved ASAP. I'm wondering if anyone has had issues with images and styles not displaying on their SF 4.3 websites after deploying to a live server? Our server environment is Rackspace so it is a dedicated virtual server and not a shared hosting environment like GoDaddy.

    Everything works properly when I build locally using Visual Studio but once deployed I lose all styles and images even though the theme is registered properly. Trying to browse directly to the stylesheet loads up a blank page. To me, it seems like the auto-redirect of /App_Data/Sitefinity to /Sitefinity doesn't work properly for some reason.

  • Dear Greg
    Are you getting any error when you use
    That is usually a good starting point for me.

  • Hi Markus -

    I'll give that a shot, thanks for the tip. I'll report back my findings.

  • So when I run Fiddler2, all CSS and image files return a 404 error. It seems like the http handler is not working properly to redirect the ~/App_Data/Sitefinity requests to ~/Sitefinity/ because the paths do indeed exist. Again, our local dev environment works fine but when we upload the project folder and database to the production server everything works but the theme.
  • Dear Greg

    Is one starting point.

    I assume you don't have an image or images folder created - that caused troubles in the past

    Did you use the path for CSS that is recomended:


    You must place the css in the Global to be picked up.

    That are all ideas I have for the moment.


  • Greg,

    You don't need to include "App_Data" in the path, in fact, it won't work if you do.

    Simply use:

    /Sitefinity/WebsiteTemplates/(Template Folder)/App_Themes/(Theme Folder)/global/main.css
    or for images...
    /Sitefinity/WebsiteTemplates/(Template Folder)/App_Themes/(Theme Folder)/images/logo.png

    Also, as Markus stated above, css files in the global folder will be included automatically if the theme is registered correctly. That means that my example for including a css file from the global folder is a bit silly but you get the point. :)
    Hope that helps!
  • Are you adding CSS though the CSS widget? That was my problem. I made my own theme based on the default basic css sheet that I extracted from my local box, (because it has all its internal classes styled) but it also had hard-coded links to image files inside it, so of course they didnt work. I thought it was a handler issue as well but it turned out not to be.

  • Hi Tim -

    Thanks for helping out. I'm aware of that fact, I was just mentioning that the SF route doesn't seem to be working. If you look at the folder structure for SF, the WebsiteTemplates folder exists within the App_Data folder, however, when the site is rendered it makes the path ~/Sitefinity/etc.

    Eric -

    I'm not adding through the CSS widget; it's loaded in the global file and is applied automatically. Again, it's taking a live, working site and copying to production with the same settings.
  • Greg,

    As I'm sure you're aware, App_Data is a special folder in .NET. AFAIK, nothing in that folder will (if referenced via URL) render out to the browser...or anything else asking for it via the web; it's by design and can't be changed. However, you can server them up via code by using "/Sitefinity". There's code in there to skip over the "App_Data" part which allows you to reference your files. I like it :)

    Why it's working on your local environment could be quite a number of things. Do you recall giving the App Pool, a user, IIS or anything else elevated rights on the root or that folder? Maybe it's just a localhost thing :/ I'm not that versed in those types of permissions...

    If I'm still rambling out in left field somewhere, please let me know! :)

  • Hi Tim -

    Good news; after pulling my hair out I finally resolved the issue. I compared my IIS roles with that of my working environment and found a few services that were not enabled: Directory browsing, http redirection, and WebDAV publishing. As soon as I enabled those roles and restarted IIS, the site is now functioning properly. I'll be updating my ticket with SF support so they know the solution as well. Since these services don't install with IIS by default, not sure why they weren't included in the list of required role services.

    Glad to be up and running, thanks everyone for your help.