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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Hozi

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

    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.Argument OutOfRangeExcep tion: 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\homep ages\36\d102265 973\core\login\ login.aspx Line: 18

    Stack Trace:

    [ArgumentOutOfRa ngeException: Length cannot be less than zero
    Parameter name: length
    System.String.S ubstring(Int32 startIndex, Int32 length) +17
    System.Web.UI.U til.GetScriptLo cation(HttpCont ext context) +20
    System.Web.UI.H tmlControls.Htm lForm.Render(Ht mlTextWriter output) +9
    System.Web.UI.C ontrol.RenderCo ntrol(HtmlTextW riter writer) +24
    ASP.Login_aspx. __Render__contr ol1(HtmlTextWri ter __output, Control parameterContai ner) in E:\kunden\homep ages\36\d102265 973\core\login\ login.aspx:1
    System.Web.UI.C ontrol.RenderCh ildren(HtmlText Writer writer) +2
    System.Web.UI.C ontrol.Render(H tmlTextWriter writer) +
    System.Web.UI.C ontrol.RenderCo ntrol(HtmlTextW riter writer) +24
    System.Web.UI.P age.ProcessRequ estMain() +190



  • Ken Cox [Microsoft MVP]

    #2
    Re: System.Argument OutOfRangeExcep tion: Length cannot be less than zero. Parameter name: length

    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" <anonymous@disc ussions.microso ft.com> wrote in message
    news:F01B037E-08DE-4336-82F5-E3A593CF9AE1@mi crosoft.com...[color=blue]
    >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.Argument OutOfRangeExcep tion: 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\homep ages\36\d102265 973\core\login\ login.aspx
    > Line: 18
    >
    > Stack Trace:
    >
    >
    > [ArgumentOutOfRa ngeException: Length cannot be less than zero.
    > Parameter name: length]
    > System.String.S ubstring(Int32 startIndex, Int32 length) +172
    > System.Web.UI.U til.GetScriptLo cation(HttpCont ext context) +202
    > System.Web.UI.H tmlControls.Htm lForm.Render(Ht mlTextWriter output) +95
    > System.Web.UI.C ontrol.RenderCo ntrol(HtmlTextW riter writer) +241
    > ASP.Login_aspx. __Render__contr ol1(HtmlTextWri ter __output, Control
    > parameterContai ner) in
    > E:\kunden\homep ages\36\d102265 973\core\login\ login.aspx:18
    > System.Web.UI.C ontrol.RenderCh ildren(HtmlText Writer writer) +27
    > System.Web.UI.C ontrol.Render(H tmlTextWriter writer) +7
    > System.Web.UI.C ontrol.RenderCo ntrol(HtmlTextW riter writer) +241
    > System.Web.UI.P age.ProcessRequ estMain() +1900
    >
    >
    >[/color]

    Comment

    Working...