Copied to clipboard

Flag this post as spam?

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


  • Ed Kolis 18 posts 38 karma points
    Oct 24, 2012 @ 19:06
    Ed Kolis
    0

    Umbraco can't find any CSS, Javascript, or images when using IIS

    I can run my site just fine in Visual Studio or IIS Express, but when I run it in IIS proper, all the CSS, Javascript, and images are missing, both from the site itself and the CMS. It appears from my browser's error console that Umbraco is looking for the files under http://localhost, while they're actually under http://localhost/MyProjectName. How can I point Umbraco at the right path?

  • Ed Kolis 18 posts 38 karma points
    Oct 29, 2012 @ 04:43
    Ed Kolis
    0

    Also, when I click on the "Home" link on my site, it takes me to http://localhost, instead of http://localhost/MyProjectName. All the other navigation links (e.g. to http://localhost/MyProjectName/MySiteSection) work fine, except for Home!

    edit: I set it up as its own web site on port 8001, not in a subfolder, but I still have the same issue with the missing static content. I've also noticed that for some reason I'm getting extra characters stuck into the doctype declaration - perhaps this is breaking things?

  • Mark Bennett 199 posts 375 karma points
    Oct 31, 2012 @ 17:53
    Mark Bennett
    0

    Ed,

    Do you still have these issues or have you managed to sort it all out?

    Mark.

  • Ed Kolis 18 posts 38 karma points
    Oct 31, 2012 @ 20:30
    Ed Kolis
    0

    Haven't figured it out yet.

  • Mark Bennett 199 posts 375 karma points
    Nov 01, 2012 @ 09:54
    Mark Bennett
    0

    Ed,

    So it looks like you have umbraco running under a subdomain or a virtual directory? Any reason why it's not just set up on the root of the site? I'm presuming you have full access to IIS so how do you have the site setup in there?

    I'm presuming it's all local at the moment and there is no public site I can look at to see what's going wrong?

    Mark.

  • Ed Kolis 18 posts 38 karma points
    Nov 01, 2012 @ 14:27
    Ed Kolis
    0

    It's a virtual directory configured as an application. I guess I could set it up as the root, since it's local, but then I'd have to assign a port number (e.g. http://localhost:8001) instead of a path (e.g. http://localhost/MyAppName). I'll try that and see what happens! Though I hear there's some sort of cache file you have to clear if you migrate a site? I think I tried migrating it once to the root before, but it still didn't work because I couldn't remember what the cache file was that I had to clear!

  • Mark Bennett 199 posts 375 karma points
    Nov 01, 2012 @ 14:35
    Mark Bennett
    0

    Ed,

    You can run more than 1 site on port 80 just use host headers in IIS - but changing port number would also work. If you are running it in a virtual directory then that's why you are getting your problems with css and the like not being picked up Umbraco likes to be all powerful and in the root ;)

    Mark..

  • Ed Kolis 18 posts 38 karma points
    Nov 01, 2012 @ 14:49
    Ed Kolis
    0

    Well, the CSS is still missing, even when I run it from the root. Where is the cache file I have to delete? Or do I need to delete the virtual directory so it's running ONLY from the root?

    edit: you sure it's not the [] characters that are mysteriously apperaring in the doctype declaration, as I mentioned above?

  • Mark Bennett 199 posts 375 karma points
    Nov 01, 2012 @ 14:58
    Mark Bennett
    0

    Ed,

    I would remove the virtual directory completely and set it up on the root.

    Characters appearing in the doctype sounds like something screwy with your template and may cause some issues? Did you use a starter kit or did you create the site from scratch?

    Mark.

  • Ed Kolis 18 posts 38 karma points
    Nov 01, 2012 @ 18:10
    Ed Kolis
    0

    Removing the virtual directory didn't seem to fix the missing CSS and such. I thought it fixed the doctype, but apparently the doctype only gets corrupted after I start clicking navigation links. Here's the doctype I get:

     

    <!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"[]>

    Notice the square brackets at the end that are completely out of place!

    I forget the name of the starter kit I used, but it had a simple layout with blue navigation buttons.

  • Mark Bennett 199 posts 375 karma points
    Nov 01, 2012 @ 23:29
    Mark Bennett
    0

    Ed,

    So your webpage has a link to the css so if you follow that link do you get any css returned? (chrome is nice when looking at the source as you can just click on the links to css and javascript). 

    If you then look on the server is the css directory in the right place and does it have the correct files there? If so does the application pool user that you are running Umbraco in have the right priviliges?

    I might be teaching you to suck eggs here?

    Mark. 

  • Ed Kolis 18 posts 38 karma points
    Nov 02, 2012 @ 09:51
    Ed Kolis
    0

    Hmm, this is weird... for some reason Umbraco is restricting access to the CSS!

    I go to http://localhost:8001/css/feijoa-blue.css, and Umbraco redirects me to http://localhost:8001/login.aspx?ReturnUrl=%2fcss%2ffeijoa-blue.css, with an error message saying that no Umbraco document matches the URL!

  • Mark Bennett 199 posts 375 karma points
    Nov 02, 2012 @ 10:08
    Mark Bennett
    0

    Ed,

    Like I said is your css in the correct directory under the root and does the application pool user have access to the files? If you moved the files from somewhere else then you will need to add the correct permissions.

    This thread seems to be the same issue. He fixed by moving umbraco back to the wwwroot folder which would have already had the correct permissions applied.

    Mark..

  • Ed Kolis 18 posts 38 karma points
    Nov 02, 2012 @ 11:29
    Ed Kolis
    0

    Nope, it still doesn't work. I'm thinking maybe I should just build the site myself in MVC, since Umbraco has so many restrictions on where things can go! If I want people to actually use this, I want to make it easy for them to install...

  • Mark Bennett 199 posts 375 karma points
    Nov 02, 2012 @ 11:48
    Mark Bennett
    0

    Ed,

    You haven't said what you've tried to do - just nope it doesn't work - doesn't really help me trying to help you??

    Umbraco is an extremely flexible system once you get your head round it and doesn't really have any restrictions.Like most frameworks it does take a little while to get used to.

    Doing it in MVC will have it's own issues but at the end of the day it will depend on what you are trying to accomplish and the level of your own knowledge. You will still have to understand how to configure IIS and setup web based applications including folder permissions etc..

    Mark..

     

  • Ed Kolis 18 posts 38 karma points
    Nov 02, 2012 @ 13:35
    Ed Kolis
    0

    I moved the folder containing my code to c:\inetpub\wwwroot, set the permissions on it (do I have to do that EVERY time I move it? why can't Windows remember what permissions I set on a folder?), and recreated the site in IIS.

    As for restrictions, you already mentioned a pretty big one - Umbraco can't be run in a virtual directory. That pretty much eliminates shared hosting...

  • Mark Bennett 199 posts 375 karma points
    Nov 02, 2012 @ 15:16
    Mark Bennett
    0

    Ed,

    OK so you moved the folder --> who did you give permissions to and what permissions did you give and how exactly did you do this? How did you 'recreate the site in IIS'? The more information you provide the more I will be able to help.

    Windows will remember what permissions you have set on a folder it won't automagically apply new permissions if you copy that folder somewhere else - unless you expliciltly make it do so.

    Umbraco not running in a virtual directory does not eliminate shared hosting plenty of people have set Umbraco up under shared hosting. Just depends on how that shared hosting is set up. You are presuming to do shared hosting that websites are setup in virtual directories?

    Mark..

  • Ed Kolis 18 posts 38 karma points
    Nov 02, 2012 @ 15:54
    Ed Kolis
    0

    I moved the folder and gave read/execute/list permissions to IIS_IUSRS; these permissions seem to reset to default every time I move the folder on some of the files.

    By "recreating the site in IIS" I mean I removed the old site pointing to the old folder, and added a new one pointing to the folder in inetpub/wwwroot (since I can't run it in a virtual directory, and I don't want to replace my ENTIRE wwwroot folder with this application).

    Shared hosting doesn't always mean "every user gets a virtual directory and no access to the root"? News to me...

    Sorry if I'm just not the kind of person who's cut out to be a part of this community by being so arrogant and demanding!

  • Mark Bennett 199 posts 375 karma points
    Nov 02, 2012 @ 16:19
    Mark Bennett
    0

    Ed,

    You are presuming IIS_IUSRS is the account that Umbraco is running under. I think you'll find that since IIS 7 (may have been 6.5) and above this hasn't been the case - the site will be running under the account running the application pool. This is normally something like IISAPPPOOL/'Application pool name' - it can be changed to run as other accounts if you change it. Understanding how ASP.Net applications + IIS work together is handy when working with .Net based frameworks like Umbraco and as I said you'd have similar problems when setting up an MVC based site.

    An easy way to check is to allow everyone access to the folders just to test it. Then remove and add the correct permissions, as you should have seen it working you will know it is just a permissions problem.

    Regarding the shared hosting - as I said earlier you can have multiple web roots and use host headers - give it a Google and it will all make sense - remember Google is your friend.

    Lol at the arrogant and demanding....

    Mark.

  • Ed Kolis 18 posts 38 karma points
    Nov 03, 2012 @ 18:24
    Ed Kolis
    0

    IIS_IUSRS is a group, not a user, but I'll try giving everyone access, or giving the app pool account access, like you suggested. In the past I'd tried running applications under my own user account, since I had no idea what user account the app pool was actually using - thanks for pointing that out for me! I thought IIS_IUSRS was a catchall group for all user accounts belonging to IIS, but I could be mistaken!

    I'm glad I haven't come across as arrogant and demanding, though! :)

  • Mark Bennett 199 posts 375 karma points
    Nov 05, 2012 @ 11:07
    Mark Bennett
    0

    So how did you get on?

  • Ed Kolis 18 posts 38 karma points
    Nov 05, 2012 @ 13:34
    Ed Kolis
    0

    I can't find any such user for the application pool to grant permissions to. Is the user dynamically created or something? If so, how would I grant him any permissions? Granting Everyone permissions seems to have fixed my problem, at least! :)

  • Mark Bennett 199 posts 375 karma points
    Nov 05, 2012 @ 13:41
    Mark Bennett
    0

    Ed,

    So it is a permissions problem and as I said previously Google is your friend....

    Mark.

Please Sign in or register to post replies

Write your reply to:

Draft