Syntax error on Orchard start

Dec 16, 2010 at 8: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.

Coordinator
Dec 16, 2010 at 3:17 PM

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

Dec 16, 2010 at 4:19 PM
Edited Dec 16, 2010 at 4: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...

Coordinator
Dec 16, 2010 at 4: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 5: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 

Coordinator
Dec 17, 2010 at 5: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 12:17 AM

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

Coordinator
Mar 15, 2011 at 12: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 12:38 AM

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

Coordinator
Mar 16, 2011 at 12: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 12:47 AM
Edited Mar 16, 2011 at 12:52 AM

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

http://staging.admaioragames.com/

no css/js

if you login as 

bertrandleroy
bertrandleroy

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.

bertrandleroy
Coordinator
Mar 16, 2011 at 12: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 12:59 AM
Edited Mar 16, 2011 at 1:00 AM

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

<?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>
    <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>

Mar 16, 2011 at 1:01 AM
Edited Mar 16, 2011 at 1: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 1:58 AM

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

Coordinator
Mar 16, 2011 at 3:08 AM

Oh, yes, NP, that makes sense.