Ask a Question related to ASP.NET Security, Design and Development.
-
ctk70 #1
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
-
how can I increase the max key length?
Hi, if I try to install mediawiki, I get following mysql-error, during running config/index.php: "Specified key was too long; max key length is... -
QueryString MAx Length
All, How can I find the Max length of the QueryString? I am passing data between ASP pages and use the Response.QueryString (I know that this is... -
Do webservices have a parameter length limitation?
I am calling a web service from a VB6 application using the following code. The idea is to pass a file (stored in XML) to the service for it to be... -
How to get length of string? length() problems
Simplified a bit, I'm parsing HTML documents to get sentences e.g. my $html = get($URL); # remove all HTML TAGs...blah blah blah @sentences =... -
Record Length
Aaron, I have a table with chars fields only. How can i find table structure size.? Iam looking for a stored procedure in sql ? thanks ... -
Joe Kaplan \(MVP - ADSI\) #2
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" <ctkent@pplweb.com.(donotspam)> wrote in message
news:BD74790B-375F-4004-8346-7F086E2BD5BE@microsoft.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
-
ctk70 #3
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" <ctkent@pplweb.com.(donotspam)> wrote in message
> news:BD74790B-375F-4004-8346-7F086E2BD5BE@microsoft.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
-
Unregistered #4
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



Reply With Quote

