Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Alan Ellicott 45 posts 104 karma points
    Mar 28, 2013 @ 01:22
    Alan Ellicott
    0

    No css or graphics on new local server for established site

    I am hoping that I can give enough information for a pattern to emerge here.

    I have transferred a 4.7 site to a new local web server and the particular site has previously been running on two different external hosts and under localhost thru web matrix on two Windows 7 machines. I am absolutely certain there is nothing wrong with the directory tree on the site itself. Wherever I move it to, I always use the same database connection details in web.config and it works fine.

    However I have just set up a Windows 2008 r3 web server to host the site locally so that I can do some experimentation with some wcf stuff and I am having trouble as the CSS and graphics are not being displayed.

    Here are the facts that may help people to assist me.

    The web server is set up with aspnet 4.0 pipeline mode.

    The site tree was copied to wwwroot and converted to an application but when it is run under localhost it does run the umbraco site but there is no CSS or graphics

    I therefore installed webmatrix 2 and attempted to run the site through it and it worked.

    I then installed a new Umbraco V6.02 using the Webmatrix appplication installer and it put the test site in the mydocuments/mywebsites folder. This works when run thru web matrix (CMS OK) I then copied the new 6.02 web site to the wwwroot folder and that works OK through webmatrix.

    So.... sites (old or new)  work so long as they are run through the virtual WebMatrix environment.

    But I don't want to run my sites through web matrix as I want them to be run through proper IIS.

    At this point I am getting desperate and wondering if it is a permissions issue so I went into IIS and set up a new application whose virtual path was to the copy of my old 4.7 website which is now residing off the root directory. Alas the web site ran but with no CSS and no Graphics

    The final thing i did was convert the 6.02 application that is inside wwwroot (and runs under webmatrix) into an IIS application and when I run it I am getting "'Access to the path C:\inetpub\wwwroot\Umbraco CMS\App_Data\TEMP\PluginCache\umbraco-plugins.hash' is denied.  ". Remember the 4.7 app ran but with no CSS or graphics.!!

    I am really confused now. I think it must be an IIS issue but could I have a permissions problem but I don't know what to look for? Browse applications in IIS produces identical results to running them properly but outside webmatrix.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 28, 2013 @ 09:22
    Jan Skovgaard
    0

    Hi Alan

    Is it the Umbraco UI CSS that is missing? Or is it the styling on your website that is missing?

    I'm sure we're gonna figure this out so you of course can run it using a normal IIS.

    /Jan

  • Gordon Saxby 1444 posts 1855 karma points
    Mar 28, 2013 @ 10:14
    Gordon Saxby
    0

    Not sure from reading your post ... but have you setup the site as an application within "localhost" (default website) or have you setup a new independent website (seperate folder structure, own website and own application pool) in IIS? I always do the latter and it always works fine for me.

  • Alan Ellicott 45 posts 104 karma points
    Mar 29, 2013 @ 00:22
    Alan Ellicott
    0

    Jan,

    It is the styling of the web site that is missing not the styling of the Umbraco backoffice GUI........ so same url plus umbraco/login.aspx gives styling to Umbraco UI but just running the Umbraco site within the default website tree doesn't. "Browsing in IIS gives the same un-styled result. I appreciate that this is probably an IIS issue rather than Umbraco because the clue is that it works under WebMatrix.

    This has got to be simple but my knowledge isn't good enough.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 29, 2013 @ 10:55
    Jan Skovgaard
    0

    Hi Allan

    Ok, could you show us your head-section? Just want to see how you reference the css. Thanks.

    /Jan

  • Alan Ellicott 45 posts 104 karma points
    Mar 29, 2013 @ 13:39
    Alan Ellicott
    0

    Below is the header. BUT, I must stress that this site works on other servers and within WebMatrix without issue and has done for 18 months without issue. A new site placed within the default website tree also has no CSS. The only possible difference is that the new server runs IIS7 whereas the others run IIS6.

    Could there be any default setting in IIS7 that could be causeng a problem. Permissions?

     

    **********************************************************************

    Header Section

     

    <%@ Master Language="C#" MasterPageFile="~/umbraco/masterpages/default.master" AutoEventWireup="true" Inherits="WEF.Utils.Master" %>

    <asp:content contentplaceholderid="ContentPlaceHolderDefault" runat="server">

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">
      <head id="head" runat="server">
        <umbraco:Macro Alias="Meta" runat="server"></umbraco:Macro>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta http-equiv="imagetoolbar" content="false" />
        <title><umbraco:Macro Alias="GetTitle" runat="server"></umbraco:Macro></title>
        <link rel="stylesheet" type="text/css" href="/css/style.css?version=1" media="screen"/>
        <link rel="stylesheet" type="text/css" href="/css/content.css" media="screen"/>
        <script type="text/javascript" src="/scripts/jQuery-1.4.2.js"></script>
       <script type="text/javascript" src="/scripts/Utils.js"></script>
        <link href="/favicon.ico" rel="shortcut icon" />
        <asp:ContentPlaceHolder Id="Script1" runat="server"></asp:ContentPlaceHolder>
        <script type="text/javascript">
       

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 29, 2013 @ 13:54
    Jan Skovgaard
    0

    Hi Allan

    Ok, that looks fine.

    I'm wondering if you're using some custom fonts perhaps? And how about video? Do you use that on the page in formats like .ogv, .mp4 etc.?

    I suspect that it might be an issue with mime-types not being recognized on the server, which in return refuses to read the styling. If you open the browser console do you see any 404 errors when it's trying to load your CSS files? If so try adding mime-types for whatever custom font or video etc. you're using.

    Ideally you should do it in the web.config.

    Looking forward to hearing from you.

    /Jan

  • Alan Ellicott 45 posts 104 karma points
    Mar 30, 2013 @ 02:39
    Alan Ellicott
    0

    Jan,

    I am halfway there in solving this but, perhaps, not the correct way.

    If you examine the lines relating to stylesheet in my head above i.e. 

    <link rel="stylesheet" type="text/css" href="/css/style.css?version=1" media="screen"/>
        <link rel="stylesheet" type="text/css" href="/css/content.css" media="screen"/>

     

    You will see that the ref is '/css/styl..........'

    I have discovered that if I put '~/css/style.css'  then my css at least works ok. I still dont get any graphics but the site looks half right..

    This is therefore all to do with "paths" but why does my external hosting (which uses the same directory tree) not need a tilde ~ but my local server does?

     


  • Paul Sørensen 304 posts 650 karma points
    Mar 30, 2013 @ 08:30
    Paul Sørensen
    1

    Jo

    Had the exact same issue on a Windows 2008 R2 server. I went into permissions and granted full  access to everyone - it's a local development machine, sp it's ok. Now it works

    /Paul S

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 30, 2013 @ 12:22
    Jan Skovgaard
    0

    Hi Allan

    Hmm, should not be neccesary to use the ~ -  If I'm not mistaken that's something to be used when installing in a virtual directory. But as Paul points out above it could be a permission issue - I really should have thought of that :) But it seems that's it's just one of many options these days...hard to remember all the possible pitfalls.

    Hope you get it working.

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft