Server error is displayed when attempting to use the Mass Change Attendance Codes function.

Error message:

Index and length must refer to a location within the string.
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: Index and length must refer to a location within the string.
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: Index and length must refer to a location within the string. Parameter name: length]   System.String.Substring(Int32 startIndex, Int32 length) +14586804   AeriesLib.CAR_Functions.GetDaySchedule(Int32 SC, Int32 SN, DateTime DT, String ConnectionString, DataTable dtSTU, Boolean SkipNoATT, Boolean SkipNoADA, Boolean ShowNoADA) in C:\agent\_work\1\s\Src\AeriesLib\Tables\Scheduling_Tables\CAR_Table.vb:1468   MassChangeATTCodes.UpdateList(Object sender, EventArgs e) in C:\agent\_work\1\s\Src\AeriesNET\MassChangeATTCodes.aspx.vb:175   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +138   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +150   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5445


Environment

  • Scheduling Type: schools using traditional scheduling
    • Secondary
    • Elementary w/MST


Cause

There is an invalid value in MST.DY for at least 1 section of the master schedule


Resolution

Correct the MST.DY value to a valid value - it should either be listed in the dropdown or correspond with selections in MST.MM through MST.MS with the first letter of the day representing the class meets that day, or a hyphen (-) indicating the class does not meet that day.