Copied to clipboard

Flag this post as spam?

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


  • Gordon Saxby 1461 posts 1883 karma points
    Nov 22, 2011 @ 21:11
    Gordon Saxby
    0

    Error when logging on

    There appears to be an issue when logging onto a protected page (fron-end not CMS). I get this error:

    Server Error in '/' Application.

    Length cannot be less than zero.
    Parameter name: length

    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: Length cannot be less than zero.
    Parameter name: length

    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: Length cannot be less than zero.
    Parameter name: length]
    System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy) +9381627
    Our.Umbraco.SafeMailLink.Filters.EncodeMailLink.Write(Byte[] buffer, Int32 offset, Int32 count) +858
    System.Web.HttpWriter.FilterIntegrated(Boolean finalFiltering, IIS7WorkerRequest wr) +9155697
    System.Web.HttpResponse.FilterOutput() +159
    System.Web.CallFilterExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +52
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

     

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Nov 22, 2011 @ 23:38
    Lee Kelleher
    0

    Thanks Gordon, I'll look into this - try to get a quick fix for you.

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Nov 23, 2011 @ 01:02
    Lee Kelleher
    0

    Hi Gordon,

    I've given this a test on my local dev - using both IIS 7.5 Express and full IIS 7.5 (app-pool in Integrated Mode).

    My test site was quite simple, restricted public access for a single node for a single member-group.  Logged in as the member (of that group), saw the page (with the correct mailto link).

    I'd like to help get to the bottom of this error ... but not sure how much info you can give me about your website's set-up?

    Thanks, Lee.

  • Gordon Saxby 1461 posts 1883 karma points
    Nov 23, 2011 @ 15:38
    Gordon Saxby
    0

    I am using a custom membership provider ... but I'm not sure if / how that could affect it?

    I will try and find some time to debug the code.

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Nov 23, 2011 @ 16:15
    Lee Kelleher
    0

    Not sure how a custom membership provider would impact it.  From looking at the exception message, the error is due to a string position check ... hmmm, not sure what it could be.

    If you get chance to debug, let me know - we'll patch it up!

    Thanks, Lee.

  • Gordon Saxby 1461 posts 1883 karma points
    Nov 24, 2011 @ 10:32
    Gordon Saxby
    0

    I downloaded the source but the "Microsoft.Web.Infrastructure" reference (referenced dll) is missing - where does it come from?

     

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Nov 24, 2011 @ 10:38
    Lee Kelleher
    0

    Hi Gordon,

    If you've got WebMatrix installed (or ASP.NET Web Pages 1.0), then it should be under this path:

    C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\Assemblies

    Otherwise I've just included the assembly in the source code repo.

    Cheers, Lee.

  • Gordon Saxby 1461 posts 1883 karma points
    Nov 29, 2011 @ 12:56
    Gordon Saxby
    1

    As emailed directly, I have now fixed the problem :-)

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Dec 01, 2011 @ 01:01
    Lee Kelleher
    0

    Just released v1.0.1 of the package. Applied your fix.  Let me know if you run into any other issues.

    Cheers, Lee.

Please Sign in or register to post replies

Write your reply to:

Draft