CSS gets removed after I signout from admin

Topics: Administration, Customizing Orchard
Jul 26, 2013 at 8:15 AM
Hi there,

This is my first day with Orchard, installed two themes but when I sign out from admin and load the root it is removing css from it. It is working fine with default theme.

This is the error, I think some permission related problem is there.

Are you in a position to sort this out.

Regards

Jaidev
Jul 26, 2013 at 2:51 PM
I assume this is your own (and first) theme then?
Make sure you have a web.config file in the Styles folder, it needs this to be able to serve files from extra folders.
I
Jul 26, 2013 at 3:37 PM
No the most popular themes downloaded from gallery.

Sent from my Windows Phone 8

Coordinator
Jul 26, 2013 at 8:28 PM
Can you be a little more specific about what theme that is? What happens when you try to load that stylesheet directly from your browser?
Jul 27, 2013 at 4:23 AM
Edited Jul 27, 2013 at 4:24 AM
One theme is "Contoso" and another is "Terra". I think both have good rating and are at top level. I hope you can understand the same from this Chrome's inspected error.

Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://127.0.0.1:8089/Users/Account/AccessDenied?ReturnUrl=%2fThemes%2fContoso%2fStyles%2fSite.css". 127.0.0.1/:9
Resource interpreted as Script but transferred with MIME type text/html: "http://127.0.0.1:8089/Users/Account/AccessDenied?ReturnUrl=%2fModules%2fOrchard.jQuery%2fScripts%2fjquery-1.8.2.min.js". 127.0.0.1/:10
Uncaught SyntaxError: Unexpected token < AccessDenied:2
Coordinator
Jul 27, 2013 at 4:57 AM
It should be pretty clear from this that yes, you have a permission issue there. First check that there is a web.config in the styles directory.
Jul 27, 2013 at 5:12 AM
For contoso, yes it is.

Sent from my Windows Phone 8

Coordinator
Jul 27, 2013 at 5:15 AM
Set-up some auditing on those files and find out why they're not being served. But this has apparently nothing to do with those themes.
Jul 27, 2013 at 6:56 AM
Hi,

Let me correct my question, the thing is there is no css access either in default theme or any other. Even "Get Started" (where we select database etc. also came without css). Previously I have not noticed this.

Look at this error in "Get Started Page"

Failed to load resource: the server responded with a status of 404 (Not Found) http://127.0.0.1:8089/Users/Account/AccessDenied?ReturnUrl=%2fThemes%2fSafeMode%2fstyles%2fsite.css
Failed to load resource: the server responded with a status of 404 (Not Found) http://127.0.0.1:8089/Users/Account/AccessDenied?ReturnUrl=%2fModules%2fOrchard.Setup%2fscripts%2fsetup.js
Failed to load resource: the server responded with a status of 404 (Not Found) http://127.0.0.1:8089/Users/Account/AccessDenied?ReturnUrl=%2fModules%2fOrchard.jQuery%2fscripts%2fjquery-1.7.1.min.js
Failed to load resource: the server responded with a status of 404 (Not Found) http://127.0.0.1:8089/Users/Account/AccessDenied?ReturnUrl=%2fCore%2fShapes%2fscripts%2fbase.js
Failed to load resource: the server responded with a status of 404 (Not Found) http://127.0.0.1:8089/Users/Account/AccessDenied?ReturnUrl=%2fModules%2fOrchard.Setup%2fcontent%2fsynchronizing.gif

I think these files are being part of loggedin template. I have no clue in this regard, please clear me from this issue.

Thanks
Coordinator
Jul 27, 2013 at 7:59 AM
Those files are static files, so Orchard has little to do with why they are not served. There seems to be something wrong with your IIS configuration here. The answer is probably in one of the web.config files up the tree from the location of one of the stylesheets.
Jul 27, 2013 at 8:58 AM
may I have an ideal setting for web.config ?
Jul 27, 2013 at 12:36 PM
I was missed to add IUSR now its working fine. Thanks

Jaidev Khatri