Professional Web Applications Themes

Length cannot be less than zero. Parameter name: length - ASP.NET Security

I receive the following error when I try to run this asp.net 1.1 app: 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 ...

  1. #1

    Default Length cannot be less than zero. Parameter name: length

    I receive the following error when I try to run this asp.net 1.1 app:

    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.Substring(Int32 startIndex, Int32 length) +172
    PPL.ESPA.WebSecurity.BaseWebSecurity..ctor(String userName) +71
    PPL.ESPA.WebSecurity.EspWebSecurity..ctor(String userName) +5
    PPL.ESPA.WebUI.BasePage.get_EspWebSecurity() +142
    PPL.ESPA.WebUI.BasePage.AuthorizeUser(String[] authorizedRoles) +18
    PPL.ESPA.WebUI.BasePage.PageLoad(Object sender, EventArgs e) +65
    System.EventHandler.Invoke(Object sender, EventArgs e) +0
    System.Web.UI.Control.OnLoad(EventArgs e) +67
    System.Web.UI.Control.LoadRecursive() +35
    System.Web.UI.Page.ProcessRequestMain() +750




    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET
    Version:1.1.4322.2032

    This works fine on my Windows 2000 SP4 server, but not on my Windows 2003
    server.

    Any idea why User.Identity.Name returns nothing on the Windows 2003 server?
    --
    Thanks,
    Chris

    ctk70 Guest

  2. #2

    Default Re: Length cannot be less than zero. Parameter name: length

    Do you have anonymous disabled in IIS and have Windows set for
    authentication mode in ASP.NET?

    Joe K.

    "ctk70" <ctkentpplweb.com.(donotspam)> wrote in message
    news:BD74790B-375F-4004-8346-7F086E2BD5BEmicrosoft.com...
    >I receive the following error when I try to run this asp.net 1.1 app:
    >
    > 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.Substring(Int32 startIndex, Int32 length) +172
    > PPL.ESPA.WebSecurity.BaseWebSecurity..ctor(String userName) +71
    > PPL.ESPA.WebSecurity.EspWebSecurity..ctor(String userName) +5
    > PPL.ESPA.WebUI.BasePage.get_EspWebSecurity() +142
    > PPL.ESPA.WebUI.BasePage.AuthorizeUser(String[] authorizedRoles) +18
    > PPL.ESPA.WebUI.BasePage.PageLoad(Object sender, EventArgs e) +65
    > System.EventHandler.Invoke(Object sender, EventArgs e) +0
    > System.Web.UI.Control.OnLoad(EventArgs e) +67
    > System.Web.UI.Control.LoadRecursive() +35
    > System.Web.UI.Page.ProcessRequestMain() +750
    >
    >
    >
    >
    > --------------------------------------------------------------------------------
    > Version Information: Microsoft .NET Framework Version:1.1.4322.2032;
    > ASP.NET
    > Version:1.1.4322.2032
    >
    > This works fine on my Windows 2000 SP4 server, but not on my Windows 2003
    > server.
    >
    > Any idea why User.Identity.Name returns nothing on the Windows 2003
    > server?
    > --
    > Thanks,
    > Chris
    >

    Joe Kaplan \(MVP - ADSI\) Guest

  3. #3

    Default Re: Length cannot be less than zero. Parameter name: length

    That was it. Thanks!

    PS: I wish the error message was a little more indicative of the problem.

    "Joe Kaplan (MVP - ADSI)" wrote:
    > Do you have anonymous disabled in IIS and have Windows set for
    > authentication mode in ASP.NET?
    >
    > Joe K.
    >
    > "ctk70" <ctkentpplweb.com.(donotspam)> wrote in message
    > news:BD74790B-375F-4004-8346-7F086E2BD5BEmicrosoft.com...
    > >I receive the following error when I try to run this asp.net 1.1 app:
    > >
    > > 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.Substring(Int32 startIndex, Int32 length) +172
    > > PPL.ESPA.WebSecurity.BaseWebSecurity..ctor(String userName) +71
    > > PPL.ESPA.WebSecurity.EspWebSecurity..ctor(String userName) +5
    > > PPL.ESPA.WebUI.BasePage.get_EspWebSecurity() +142
    > > PPL.ESPA.WebUI.BasePage.AuthorizeUser(String[] authorizedRoles) +18
    > > PPL.ESPA.WebUI.BasePage.PageLoad(Object sender, EventArgs e) +65
    > > System.EventHandler.Invoke(Object sender, EventArgs e) +0
    > > System.Web.UI.Control.OnLoad(EventArgs e) +67
    > > System.Web.UI.Control.LoadRecursive() +35
    > > System.Web.UI.Page.ProcessRequestMain() +750
    > >
    > >
    > >
    > >
    > > --------------------------------------------------------------------------------
    > > Version Information: Microsoft .NET Framework Version:1.1.4322.2032;
    > > ASP.NET
    > > Version:1.1.4322.2032
    > >
    > > This works fine on my Windows 2000 SP4 server, but not on my Windows 2003
    > > server.
    > >
    > > Any idea why User.Identity.Name returns nothing on the Windows 2003
    > > server?
    > > --
    > > Thanks,
    > > Chris
    > >
    >
    >
    >
    ctk70 Guest

  4. #4

    Default Length cannot be less than zero. Parameter name: length

    My client got the same error. in my web.config it is "Windows Authentication". In my IIS anonymous is disabled. Still this error is coming? Please help me in this regards.
    Unregistered Guest

Similar Threads

  1. SQL buffer length
    By Tabo in forum ASP.NET Data Grid Control
    Replies: 0
    Last Post: October 10th, 09:15 AM
  2. QueryString Length
    By Ray at in forum ASP
    Replies: 4
    Last Post: September 22nd, 06:01 PM
  3. Do webservices have a parameter length limitation?
    By Al Knowles in forum ASP.NET Web Services
    Replies: 0
    Last Post: August 29th, 11:32 AM
  4. How to get length of string? length() problems
    By Mitchua in forum PERL Modules
    Replies: 5
    Last Post: July 17th, 12:08 AM
  5. Field length
    By Bebop & Rocksteady in forum FileMaker
    Replies: 9
    Last Post: July 13th, 01:31 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139