I can not display images, css, js

Topics: Administration, Customizing Orchard, General, Installing Orchard, Writing themes
Jun 3, 2013 at 9:12 AM
Hi, just use orchard cms, working with WebMatrix and everything seems to be fine. I purchased a space on accuwebhosting and used the web deploy to publish online. Publication ok. Just load the page is the area that the public administration panel do not load css files, js files, and images of the site. Sorry for the English
Developer
Jun 3, 2013 at 10:49 AM
If none of the pages of your site display static resources (not just the admin) then it's likely a permission issue (i.e. the outer world not having permission to access static resources) and your hosting provides should fix is. What do you see when you try to open a static resource from the browser? 404? Access denied?
Jun 3, 2013 at 11:09 AM
This the response of my host:
We have checked and it seems that your image and CSS file path is wrong setup. It seems it is setup according to your local system. You can set the relative path and have a check with web pages.
if I try to access the resource returns me 404. The hosting told me that I should change the url and use relative paths.
Below is a screen of chrome site where only displays text. The alt at the bottom that displays chroma uses the wrong directory

Image
Developer
Jun 3, 2013 at 11:29 AM
If /Sanandres is your home page then that's your app path, i.e. urls should be under it and your hoster is right. In your stylesheet, where you include the image, use a relative path indeed (i.e. relative from your stylesheet to the image). -----Eredeti
üzenet----- Feladó: "MCMax" Elküldve: 2013.06.03, 12:09 Címzett: [email removed] Tárgy: Re: I can not display images, css, js [orchard:445785] From: MCMax This the response of my host: We have checked and it seems that your image and CSS file path is wrong
setup. It seems it is setup according to your local system. You can set the relative path and have a check with web pages. if I try to access the resource returns me 404. The hosting told me that I should change the url and use relative paths. Below is a screen
of chrome site where only displays text. The alt at the bottom that displays chroma uses the wrong directory
Jun 3, 2013 at 11:40 AM
It sanandres is the directory where orchard. The exact url would be / sanandres / index .. If you want I can create you a ftp access and you could see in person .. I would be very grateful.
Developer
Jun 3, 2013 at 11:45 AM
Ok, I can take a look. -----Eredeti üzenet----- Feladó: "MCMax" Elküldve: 2013.06.03, 12:40 Címzett: [email removed] Tárgy: Re: I can not display images, css, js [orchard:445785] From: MCMax It sanandres is the directory where orchard. The exact url would
be / sanandres / index .. If you want I can create you a ftp access and you could see in person .. I would be very grateful.
Jun 7, 2013 at 5:33 PM
If you were to serve the community .. The problem was resolved by deleting from the web.config file in the root folder the following lines:
 <handlers accessPolicy="Script">
      <!-- clear all handlers, prevents executing code file extensions, prevents returning any file contents -->
      <clear />
      <!-- Return 404 for all requests via managed handler. The url routing handler will substitute the mvc request handler when routes match. -->
      <add name="NotFound" path="*" verb="*" type="System.Web.HttpNotFoundHandler" preCondition="integratedMode" requireAccess="Script" />
      <!-- WebApi -->
      <remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" />
      <remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" />
      <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
      <add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
      <add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
      <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
    </handlers>
In the various internal files to the directory script style images etc etc, I removed these lines:
 <handlers accessPolicy="Script,Read">
      <!--
      iis7 - for any request to a file exists on disk, return it via native http module.
      accessPolicy 'Script' is to allow for a managed 404 page.
      -->
      <add name="StaticFile" path="*" verb="*" modules="StaticFileModule" preCondition="integratedMode" resourceType="File" requireAccess="Read" />
    </handlers>
At the moment my hosting is AccuwebHosting
Coordinator
Jun 7, 2013 at 7:01 PM
It can happen if the server is on Windows 2012 and you have not defined the app pool to run in Integrated mode.
Jun 8, 2013 at 9:13 AM
In accuwebhosting I can not configure the server so I changed the web.config .. Thanks for the answer ... Now I would like to configure my iss such as online to work in web deploy and have everything in sync