Copied to clipboard

Flag this post as spam?

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


  • Jennifer Killingsworth 191 posts 247 karma points
    Oct 14, 2014 @ 17:00
    Jennifer Killingsworth
    0

    StartIndex cannot be less than zero.

    I upgraded Umbraco from 4.7.1 to Umbraco 4.11.10.  Everything seems to work fine except, if I go to a start node that doesn't exist, it doesn't show the standard 404 Not Found page.  Instead it shows:

    StartIndex cannot be less than zero.
    Parameter name: startIndex

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.ArgumentOutOfRangeException: StartIndex cannot be less than zero.
    Parameter name: startIndex

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


    Stack Trace:

    [ArgumentOutOfRangeException: StartIndex cannot be less than zero.
    Parameter name: startIndex]
       System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy) +10929171
       AutoFolders.NotFoundHandler.Execute(String url) +223
       Umbraco.Web.Routing.LookupByNotFoundHandlers.HandlePageNotFound(PublishedContentRequest docRequest) +1148
       Umbraco.Web.Routing.LookupByNotFoundHandlers.TrySetDocument(PublishedContentRequest docRequest) +10
       Umbraco.Web.Routing.PublishedContentRequestBuilder.<LookupDocument1>b__1e(IPublishedContentLookup lookup) +15
       System.Linq.Enumerable.Any(IEnumerable`1 source, Func`2 predicate) +146
       Umbraco.Web.Routing.PublishedContentRequestBuilder.LookupDocument1() +198
       Umbraco.Web.Routing.PublishedContentRequestBuilder.LookupDocument() +195
       Umbraco.Web.Routing.PublishedContentRequest.ProcessRequest(HttpContextBase httpContext, UmbracoContext umbracoContext, Action`1 onSuccess) +139
       Umbraco.Web.UmbracoModule.ProcessRequest(HttpContextBase httpContext) +339
       Umbraco.Web.UmbracoModule.<Init>b__7(Object sender, EventArgs e) +80
       System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +136
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69
    



    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18446

    However, if I go to a subnode that doesn't exist, I get the 404 Not Found page that I would expect.

    So, mydomain.com/page - StartIndex cannot be less than zero

    But, mydomain.com/page/page - get standard 404 error page

    Any thoughts?

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Oct 14, 2014 @ 20:35
    Jan Skovgaard
    0

    Hi Jennifer

    Did you go straight from 4.7 to 4.11?

    And does the site contain any custom Umbraco API integration? Are there any possible 3rd party packages issue? MNTP issues?

    Have you checked the /app_data/logs folder to see if the log file reveals anything?

    /Jan

  • Charles Afford 1163 posts 1709 karma points
    Oct 16, 2014 @ 19:54
    Charles Afford
    0

    I have seen this before when a property type has been changed from either a string/mntp to a boolean.

    As Jan says i would check the logs and see what is throwing the exception :)

  • Jennifer Killingsworth 191 posts 247 karma points
    Oct 16, 2014 @ 19:58
    Jennifer Killingsworth
    1

    This page indicated that the problem could be with Autofolders: http://stackoverflow.com/questions/20586338/startindex-cannot-be-less-than-zero-showing-instead-of-404-page

    I removed: <notFound assembly="AutoFolders" type="NotFoundHandler" /> from the 404handlers.config – it resolved the issue, I added it back in, but placed it at the end of the config file instead of the beginning. It appears to be working fine.

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Oct 16, 2014 @ 19:59
    Jan Skovgaard
    0

    Hi Jennifer

    Thanks for sharing - Happy that you managed to figure it out :)

    Cheers, Jan

  • Charles Afford 1163 posts 1709 karma points
    Oct 16, 2014 @ 20:13
    Charles Afford
    0

    Thanks Jennifer good to know :)

  • Stephen Davidson 216 posts 392 karma points
    Oct 26, 2015 @ 14:09
    Stephen Davidson
    0

    I am getting this on 7.x install where there have been no updates at all over the last few days...there is no mention of the above entry in my 404 config..

  • Tobias 13 posts 85 karma points
    Mar 28, 2023 @ 09:32
    Tobias
    0

    Got this error in Umbraco 11 when my page didn't have a template assigned.

  • Thomas 315 posts 602 karma points c-trib
    Aug 18, 2023 @ 14:00
    Thomas
    0

    Did you find a solution ? Getting the same error in 11

  • Tobias 13 posts 85 karma points
    Aug 18, 2023 @ 14:03
    Tobias
    0

    I just set a template to my page

Please Sign in or register to post replies

Write your reply to:

Draft