OrchardCMS / Orchard

Orchard is a free, open source, community-focused Content Management System built on the ASP.NET MVC platform.
https://orchardproject.net
BSD 3-Clause "New" or "Revised" License
2.37k stars 1.12k forks source link

Resources failing to load after deployment #7666

Closed sdimech closed 7 years ago

sdimech commented 7 years ago

I'm quite new to Orchard and could not find an issue similar to mine. Basically, I downloaded Orchard and developed a custom module. After deploying I noticed that css and js files in modules are not being loaded both in the front end and dashboard. This is resulting in badly rendered pages and unusable functionality. Please refer to screenshots below.

image

image

Any help would be greatly appreciated, I spent a lot of hours trying to fix this.

sebastienros commented 7 years ago

It's usually because the folder is missing a proper web.config that enables static file to be served. Look at the /Media folder and copy paste the web.config to your folder containing the files.

sdimech commented 7 years ago

I have already ready checked, and the web.config is present in the Styles and Scripts folder of every module. Any idea what may be causing this?

sebastienros commented 7 years ago

Sorry, I had not seen it's also for the files in existing modules.

Are you sure the files are actually deployed? Have you checked the server?

sdimech commented 7 years ago

I setup IIS on my local PC and tested the website using the same files I deployed on the server and it is working fine. I granted full control to IIS_IUSRS on all folders on server and it's still the same. I cannot understand what's happening.

sdimech commented 7 years ago

I managed to fix the issue. After checking the IIS log files I noticed that the Urls where being rejected by UrlScan ISAPI filter. I removed the filter from IIS Manager and now it works perfectly!