Theme Directory Depth

Topics: Customizing Orchard, General
Jul 12, 2013 at 7:47 PM
I have had this come up a few times, and I have worked around it but need to figure it out this time. I am trying to load a css file that is two levels deep in my theme. So lets just say for example I am trying to call skin.css

/Themes/MyTheme/skins/defaultskin/skin.css

I have added the web.config file in each directory and still get a 404 for the file. Also this file is being requested from a custom js script, so using style.include isn't an option for me.

Is this a bug? or am I just missing something.
Developer
Jul 12, 2013 at 7:58 PM
If you copied the web.config file from one of "Scripts", "Styles" or "Content" to your "skins" folder, it should just work.
Jul 12, 2013 at 8:07 PM
That is the web.config I am using, and sorry not a 404, I am getting a 500 error.
Developer
Jul 12, 2013 at 8:13 PM
What is the exact 500 error?
Developer
Jul 12, 2013 at 8:13 PM
If you turn off custom errors, you should be able to see.
Jul 12, 2013 at 8:27 PM
Well, I just get a white screen when I browse to that file, Firebug just shows me 500 Internal Server Error
Developer
Jul 12, 2013 at 8:55 PM
Anything in the Windows Event Viewer?
Jul 12, 2013 at 9:04 PM
Event code: 4005
Event message: Forms authentication failed for the request. Reason: The ticket supplied was invalid.
Event time: 7/12/2013 12:59:10 PM
Event time (UTC): 7/12/2013 7:59:10 PM
Event ID: 22936082cb3d40fb9b8cf8f893be3e82
Event sequence: 339
Event occurrence: 48
Event detail code: 50201

Application information:
Application domain: /LM/W3SVC/1/ROOT/BrixOrchard-5-130181307314176116 
Trust level: Full 
Application Virtual Path: /BrixOrchard 
Application Path: C:\inetpub\wwwroot\BrixOrchard\ 
Machine name: ######### 
Process information:
Process ID: 17108 
Process name: w3wp.exe 
Account name: IIS APPPOOL\DefaultAppPool 
Request information:
Request URL: http://#######/BrixOrchard 
Request path: /BrixOrchard 
User host address: ###### 
User:  
Is authenticated: False 
Authentication Type:  
Thread account name: IIS APPPOOL\DefaultAppPool 
Name to authenticate:

Custom event details:
Developer
Jul 12, 2013 at 9:32 PM
Could you paste in the contents of your web.config file that is in the Skins folder, and any web.config file in any sub folder?
Jul 12, 2013 at 9:47 PM
It's the same for all my theme sub-folders

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appSettings>
<add key="webpages:Enabled" value="false" />
</appSettings>
<system.web>
<httpHandlers>
  <!-- iis6 - for any request in this location, return via managed static file handler -->
  <add path="*" verb="*" type="System.Web.StaticFileHandler" />
</httpHandlers>
</system.web>
<system.webServer>
<staticContent>
  <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
</staticContent>

<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>
</system.webServer>
</configuration>