Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Steven 12 posts 83 karma points
    May 22, 2013 @ 13:27
    Steven
    0

    Error message 'Length cannot be less than zero' after set-up Tea Commerce starterkit v3.1.1

    I've downloaded Tea Commerce starterkit v3.1.1, created a website (.NET 4.0, integrated pipeline) and placed all files in the webfolder. I set the default Umbraco file permissions with [icacls] and ran the SQL-script to set up the database. Modified web.config to connect with the new database. When requesting the site, I get the following error "Length cannot be less than zero". When requesting the location '/umbraco' the log on form is shown. But when I log on with the default/given admin account, the same error occurs after authentication.

    It looks like some setting(s) data is missing or cannot be accessed.
    What is wrong? Thanks in advance!

  • Anders Burla Johansen 2560 posts 8256 karma points
    May 22, 2013 @ 13:41
    Anders Burla Johansen
    0

    Hmm - sounds weird. Could you try and do a clean install of a new starter kit on your local machine? We have tested the starter kit in house and didnt have any problems.

    Kind regards
    Anders

  • Steven 12 posts 83 karma points
    May 22, 2013 @ 14:01
    Steven
    0

    Removed all files from webfolder, extracted all files from the zip-file again and copied them to the webfolder. Set file permissions through icacls, restarted website, but without any luck. Error message;

     

    And when I try to log on to the administration section (/umbraco/), after logging on with default account, a similar error message occurs;

  • Anders Burla Johansen 2560 posts 8256 karma points
    May 23, 2013 @ 14:24
    Anders Burla Johansen
    0

    Did you remember to unblock the .zip file before unpacking?

    Kind regards
    Anders

  • Steven 12 posts 83 karma points
    May 23, 2013 @ 14:31
    Steven
    0

    Hi Anders,

    Thanks for your support/feedback!

    Yes, I did, I've unblocked the zip.

    And to make sure there aren't any blocks on any of the files, I've run "streams" on the website just now (a tool to check for 'streams' with "Block(ed) info" on files http://technet.microsoft.com/en-us/sysinternals/bb897440.aspx ). But unfortunately, no streams on any of the files, so that didn't solve the problem...

  • Anders Burla Johansen 2560 posts 8256 karma points
    May 23, 2013 @ 15:14
    Anders Burla Johansen
    0

    Its really weird - i just installed the starter kit locally and all worked - took 5 min

    Windows 8, IIS 8 (alworks with 7), Net 4.5

    Kind regards
    Anders

  • Steven 12 posts 83 karma points
    May 23, 2013 @ 16:00
    Steven
    0

    Could it have anything to do with the website folder being a network share?

    When I lookup "GetRootDirectorySafe" from Umbraco sourcecode (v6.10/"0fab65ce232f"), it is the following code;

            /// <summary>
            /// Returns the path to the root of the application, by getting the path to where the assembly where this
            /// method is included is present, then traversing until it's past the /bin directory. Ie. this makes it work
            /// even if the assembly is in a /bin/debug or /bin/release folder
            /// </summary>
            /// <returns></returns>
            internal static string GetRootDirectorySafe()
            {
                if (string.IsNullOrEmpty(_rootDir) == false)
                {
                    return _rootDir;
                }

                var codeBase = Assembly.GetExecutingAssembly().CodeBase;
                var uri = new Uri(codeBase);
                var path = uri.LocalPath;
                var baseDirectory = Path.GetDirectoryName(path);
                if (string.IsNullOrEmpty(baseDirectory))
                    throw new Exception("No root directory could be resolved. Please ensure that your Umbraco solution is correctly configured.");

                _rootDir = baseDirectory.Contains("bin")
                               ? baseDirectory.Substring(0, baseDirectory.LastIndexOf("bin", StringComparison.OrdinalIgnoreCase) - 1)
                               : baseDirectory;

                return _rootDir;
            }

    And judging by the error message ("Length cannot be less than zero. Parameter name: length"), it crashes on the line with 'Substring' where an invalid length is used.

  • Anders Burla Johansen 2560 posts 8256 karma points
    May 23, 2013 @ 16:20
    Anders Burla Johansen
    0

    Hmm that could be. Maybe report it as a bug - http://issues.umbraco.org/

    Kind regards
    Anders

Please Sign in or register to post replies

Write your reply to:

Draft