Relative path of css and js files missing application name. 404 not found
Hello,
I added Umbraco to an MVC application on VS 2015.
When I launched the app using IISExpress, the umbraco home page is displayed correctly (js, css, images loaded).
But when I deployed to local IIS, the home page is loaded but the files (js, css, images) are not loaded since the links generated are like:
/css/fanoe.css
/css/style.css
background-image:url(/media/1050/nccbg2.jpg)
/js/jquery.min.js
when I inspect the code and add the absolute path, everything loads correctly.
I recommend you user a modern browser like Chrome to debug the issue. In Chrome use inspector (F12) to look at the console tab and see which status codes are being returned for the missing items.
Depending on the HTTP status code you will need to make changes to different areas of IIS. Once you know the code you can use Google to narrow done which configuration issue needs fixing. I think since IIS 7 you can control the configuration of IIS in the web.config so this is where to start looking.
HTTP status code is your quickest path to fixing it
Status codes:
401 would suggest that you have an authentication issue
403 Forbiden
404 page is missing
500 server error, something wrong with the code
If you can't get enough information from Chrome then install Fiddler it's a web debugging proxy and sits between your broswer and the server to capture all the traffic. This can really pin down tricky issues. It's especially helpful with Ajax requests or replaying a request.
Relative path of css and js files missing application name. 404 not found
Hello, I added Umbraco to an MVC application on VS 2015. When I launched the app using IISExpress, the umbraco home page is displayed correctly (js, css, images loaded). But when I deployed to local IIS, the home page is loaded but the files (js, css, images) are not loaded since the links generated are like: /css/fanoe.css /css/style.css background-image:url(/media/1050/nccbg2.jpg) /js/jquery.min.js when I inspect the code and add the absolute path, everything loads correctly.
some links are generated correctly The starter kit
How do I fix the links for the js/css/images?
Hi Rakesh
Links like: /css/fanoe.css /css/style.css background-image:url(/media/1050/nccbg2.jpg) /js/jquery.min.js looks right, it should work.
Do you have access to this files on the server or via browser?
Thanks,
Alex
I recommend you user a modern browser like Chrome to debug the issue. In Chrome use inspector (F12) to look at the console tab and see which status codes are being returned for the missing items.
Depending on the HTTP status code you will need to make changes to different areas of IIS. Once you know the code you can use Google to narrow done which configuration issue needs fixing. I think since IIS 7 you can control the configuration of IIS in the web.config so this is where to start looking.
HTTP status code is your quickest path to fixing it
Status codes:
If you can't get enough information from Chrome then install Fiddler it's a web debugging proxy and sits between your broswer and the server to capture all the traffic. This can really pin down tricky issues. It's especially helpful with Ajax requests or replaying a request.
Best of luck.
is working on a reply...