Server Error in '/' Application.

StartIndex cannot be less than zero.
Parameter name: startIndex

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: StartIndex cannot be less than zero.
Parameter name: startIndex

Source Error:


Line 147:			catch {}
Line 148:			dbConn.Close();
Line 149:			agentToEmail = allContent.Substring(allContent.IndexOf("i:" + agentPostAuthorID + ";s:"));
Line 150:			agentToEmail = agentToEmail.Substring(agentToEmail.IndexOf("\"") + 1);
Line 151:			agentToEmail = agentToEmail.Substring(0, agentToEmail.IndexOf("\"")) + "@vincentvacations.com";

Source File: \\fs2-n01\stor1wc2dfw1\415337\www.vincentvacations.com\web\content\download\index.aspx    Line: 149

Stack Trace:


[ArgumentOutOfRangeException: StartIndex cannot be less than zero.
Parameter name: startIndex]
   System.String.Substring(Int32 startIndex, Int32 length) +14599087
   ASP.download_index_aspx.GetAgentEmail() in \\fs2-n01\stor1wc2dfw1\415337\www.vincentvacations.com\web\content\download\index.aspx:149
   ASP.download_index_aspx.SetupAgent(String travelAgentName) in \\fs2-n01\stor1wc2dfw1\415337\www.vincentvacations.com\web\content\download\index.aspx:119
   ASP.download_index_aspx.Page_Load(Object sender, EventArgs e) in \\fs2-n01\stor1wc2dfw1\415337\www.vincentvacations.com\web\content\download\index.aspx:59
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4700.0