System.ArgumentOutOfRangeException: Length cannot be less than zero. Parameter name: length

Discussion in 'ASP .Net' started by =?Utf-8?B?SG96aQ==?=, Jun 1, 2004.

  1. I am getting the below error when asp.net tries to parse the .aspx file. The funny part is that the error only seems to be happening when viewing the page throuh IE 6 and not Netscape browsers. I am not sure exactly what is throwing it off, especially in the form tag

    Has anybody seen this happening to them? It worked on IE briefly and then it started happening again. Any help would be greatly appreciated

    Here is the full source of the error

    System.ArgumentOutOfRangeException: Length cannot be less than zero. Parameter name: lengt

    Source Error:

    Line 16: </HEAD
    Line 17: <body MS_POSITIONING="GridLayout"
    Line 18: <form id="Form1" method="post" runat="server"
    Line 19: <table width="750" height="500" border="0" align="center" cellpadding="0" cellspacing="0
    Line 20: class="white-border"


    Source File: E:\kunden\homepages\36\d102265973\core\login\login.aspx Line: 18

    Stack Trace:

    [ArgumentOutOfRangeException: Length cannot be less than zero
    Parameter name: length
    System.String.Substring(Int32 startIndex, Int32 length) +17
    System.Web.UI.Util.GetScriptLocation(HttpContext context) +20
    System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +9
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +24
    ASP.Login_aspx.__Render__control1(HtmlTextWriter __output, Control parameterContainer) in E:\kunden\homepages\36\d102265973\core\login\login.aspx:1
    System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +2
    System.Web.UI.Control.Render(HtmlTextWriter writer) +
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +24
    System.Web.UI.Page.ProcessRequestMain() +190
     
    =?Utf-8?B?SG96aQ==?=, Jun 1, 2004
    #1
    1. Advertising

  2. Is it possible that IE or your proxy server is caching a bad version?

    Make sure you have IE set to get a new page every time or add a question
    mark ("?") to the file extension to make the URL "new" to the cache.

    Do you have more than one form tag?

    "Hozi" <> wrote in message
    news:...
    >I am getting the below error when asp.net tries to parse the .aspx file.
    >The funny part is that the error only seems to be happening when viewing
    >the page throuh IE 6 and not Netscape browsers. I am not sure exactly what
    >is throwing it off, especially in the form tag.
    >
    > Has anybody seen this happening to them? It worked on IE briefly and then
    > it started happening again. Any help would be greatly appreciated.
    >
    > Here is the full source of the error:
    >
    > System.ArgumentOutOfRangeException: Length cannot be less than zero.
    > Parameter name: length
    >
    > Source Error:
    >
    >
    > Line 16: </HEAD>
    > Line 17: <body MS_POSITIONING="GridLayout">
    > Line 18: <form id="Form1" method="post" runat="server">
    > Line 19: <table width="750" height="500" border="0" align="center"
    > cellpadding="0" cellspacing="0"
    > Line 20: class="white-border">
    >
    >
    > Source File: E:\kunden\homepages\36\d102265973\core\login\login.aspx
    > Line: 18
    >
    > Stack Trace:
    >
    >
    > [ArgumentOutOfRangeException: Length cannot be less than zero.
    > Parameter name: length]
    > System.String.Substring(Int32 startIndex, Int32 length) +172
    > System.Web.UI.Util.GetScriptLocation(HttpContext context) +202
    > System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +95
    > System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +241
    > ASP.Login_aspx.__Render__control1(HtmlTextWriter __output, Control
    > parameterContainer) in
    > E:\kunden\homepages\36\d102265973\core\login\login.aspx:18
    > System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +27
    > System.Web.UI.Control.Render(HtmlTextWriter writer) +7
    > System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +241
    > System.Web.UI.Page.ProcessRequestMain() +1900
    >
    >
    >
     
    Ken Cox [Microsoft MVP], Jun 2, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Mason

    Length cannot be less than zero

    John Mason, Apr 16, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    6,750
    John Mason
    Jun 2, 2004
  2. Replies:
    2
    Views:
    5,972
  3. MattB

    Custom CheckBoxList "Length cannot be less than zero" error

    MattB, Aug 2, 2004, in forum: ASP .Net Building Controls
    Replies:
    4
    Views:
    267
    Bill Cohagan
    Sep 28, 2004
  4. ctk70
    Replies:
    2
    Views:
    525
    ctk70
    Feb 10, 2005
  5. Replies:
    0
    Views:
    495
Loading...

Share This Page