MPS SampleWeb Fix for: "Length cannot be less than zero. Parameter name: length "
I noticed that many people were having this issue via the Windows Hosting Forums...
Issue:
During the deployment of MPS 2.0, you will get the following error in a browser when attempting to logon to the SampleWeb application.
Server Error in '/MPSSampleWeb' 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.Substring(Int32 startIndex, Int32 length) +172 MPSSampleWeb.classes.UserContext.setGroups(String path) +462 MPSSampleWeb.classes.UserContext.GetContext() +187 MPSSampleWeb.Global.Session_Start(Object sender, EventArgs e) +207 System.Web.SessionState.SessionStateModule.RaiseOnStart(EventArgs e) +132 System.Web.SessionState.SessionStateModule.CompleteAcquireState() +514 System.Web.SessionState.SessionStateModule. BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +697 System.Web.AsyncEventExecutionStep.System. Web.HttpApplication+IExecutionStep.Execute() +66 System.Web.HttpApplication.ExecuteStep (IExecutionStep step, Boolean& completedSynchronously) +173 |
Resolution:
This post moved to: http://agramont.net/blogs/conrad/archive/2005/05/06/33.aspx