This project is read-only.

Syntax error on Orchard start

Dec 16, 2010 at 9:28 AM

I am getting the following error when starting up orchard.

Message: Syntax error
Line: 1
Char: 1
Code: 0
URI: http://orcharddev/Users/Account/AccessDenied?ReturnUrl=%2fCore%2fShapes%2fscripts%2fhtml5.js

I am not sure why the return URL is set to a script reference as I am inserting the URL manually into the browser. I have tried clearing cache & cookies on browsers (happens on all browsers, IE 8, Firefox, Chrome Opera, Safari) 

The page renders but without styling. I can select login and after login the site is fine. I get this error again when I log out and it then persists.

Dec 16, 2010 at 4:17 PM

Probably a bad or missing web.config in that directory or above it.

Dec 16, 2010 at 5:19 PM
Edited Dec 16, 2010 at 5:21 PM

Hi Bertrand, I have found a way to replicate. When I log in on orchard, log out of orchard and then refresh the browser page <CTRL><F5> a few times this issue surfaces. After that even after closing browser, restarting IIS nothing helps. If I then log in on orchard again the issue disappears. Quite strange...

Dec 16, 2010 at 5:27 PM

If that is with the latest dev build, please file a bug, we'll fix it and provide you a workaround. I'll investigate later today. Thanks for reporting this.

Dec 17, 2010 at 6:25 AM

I have tried this on another machine and it did not show the same behaviour. The only difference between the 2 machines are that on one I have MVC 3 RC2 installed. On the machine with MVC 3 RC2 installed I can not replicate this so I take it this must be an inherent MVC issue not an Orchard issue.  Bertrand do you still want me to file a bug for this? For reference I am using dev build with changeset: 3982 

Dec 17, 2010 at 6:27 AM

Ah yes, that is a known issue that we are actually calling out in the release notes of 0.9. Thanks for reporting it.

Mar 15, 2011 at 1:17 AM

I'm using orchard v1.0.20 and I still see this problem. I guess this has not been fixed yet...

Mar 15, 2011 at 1:21 AM

@smnbss yes it has, it's your machine that needs fixing if I'm not mistaken: you seem to have an old version of MVC installed there. Can you please check that?

Mar 16, 2011 at 1:38 AM

@bertrandleroy I've got MVC 3.0.20105.0 on that machine, so it looks like it's the latest version...

Mar 16, 2011 at 1:41 AM

OK, so first I'd like to check what exactly we are talking about. Can you please details the repro steps that lead to the error in your case?

Mar 16, 2011 at 1:47 AM
Edited Mar 16, 2011 at 1:52 AM

open this url and you'll see the problem with your eyes

no css/js

if you login as 


the site will work fine

This happens only on one windows 7 machine but not on another one.
It's not clear what cause it.

Mar 16, 2011 at 1:55 AM

Exact same files on both machines? What do the web.config files in the directories where the stylesheets are look like?

Mar 16, 2011 at 1:59 AM
Edited Mar 16, 2011 at 2:00 AM

exactly the same. all webconfig.files are the default ones...

<?xml version="1.0" encoding="UTF-8"?>
    <add key="webpages:Enabled" value="false" />
      <!-- iis6 - for any request in this location, return via managed static file handler -->
      <add path="*" verb="*" type="System.Web.StaticFileHandler" />
    <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" />

Mar 16, 2011 at 2:01 AM
Edited Mar 16, 2011 at 2:03 AM

I'm going to try to install orchard from the WPI on the machine where it does not work....

Do you think it could be a security problem on files?

What else could cause the request to be redirected other than setting on web.config or iis?

Mar 16, 2011 at 2:58 AM

ok, I think it was a misconfiguration of permissions on the file system. sorry

Mar 16, 2011 at 4:08 AM

Oh, yes, NP, that makes sense.