Umbraco dependencies files (css, javascript) on IIS working on /wwwroot subfolder, not working everywhere else

485 views Asked by At

I am trying to get an Umbraco solution to work on my development machine; I did not install Umbraco, but I unzipped the files on a local folder, pointed a new IIS site there, and gave permissions to both NETWORK SERVICE and IIS_IUSRS.

If I have the files in a subfolder of /wwwroot it works fine, but if I move the files somewhere else all CSS, images and Javascript files return 404. If I create a dummy HTML file and try to have IIS to serve it I get:

Page not found
No umbraco document matches the url '/login.aspx?ReturnUrl=%2fcss%2ftest.html'.

Could anyone help me to understand what's so different between those two locations?

2

There are 2 answers

1
Neil On BEST ANSWER

I believe your permissions are still skewed and possibly not propagating down into the files. The required permissions are determined by the user identity of the Application Pool. By default and best practice is to run it as the 'app pool identity' so it's basically it's own user. If you are just looking for a dev setup you should get into the app pool settings and have it run as 'System' (very insecure) but that could get it working in one step.

The proper way to do it is to run the permissions batch script for umbraco. Unfortunately their site seems to be undergoing a restructuring and the page is down, but I found a google cache version: http://bit.ly/1GvPl6n

I'd recommend the powershell script and running powershell as administrator. I had to copy-paste an edited version (look for web site name, folder paths, etc to customize to your setup) into the powershell for it to work, but once it did I was all set.

Here's more info on Application Pool user identities: http://forums.asp.net/t/1387880.aspx?IIS+7+Application+Pool+Identity+Setting+Local+System+or+Network+Service+

0
Carl Sargunar On

If it's a development machine, although it's not best practice, you could just give the Everyone user full control of that folder. That should rule out any permissions problems either way