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.
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.
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.
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?
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.
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?
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
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.
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.
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
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.
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.
Hi Allan
Ok, could you show us your head-section? Just want to see how you reference the css. Thanks.
/Jan
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">
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
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?
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
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
is working on a reply...