Server Error in '/' Application.

Input string was not in a correct format.

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.FormatException: Input string was not in a correct format.

Source Error:


Line 48: 
Line 49:             intFind = strDirName.LastIndexOf("/")
Line 50:             intSiteId = strDirName.Remove(0, intFind + 1)
Line 51: 
Line 52:         End If

Source File: D:\Websites\VW6\htdocs\App_Code\LocalFiles\_LocalVar.vb    Line: 50

Stack Trace:


[FormatException: Input string was not in a correct format.]
   Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble(String Value, NumberFormatInfo NumberFormat) +299
   Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value) +98

[InvalidCastException: Conversion from string "News" to type 'Integer' is not valid.]
   Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value) +273
   LocalVar.SiteId() in D:\Websites\VW6\htdocs\App_Code\LocalFiles\_LocalVar.vb:50
   BasePage.SelectMaster() in D:\Websites\VW6\htdocs\App_Code\BasePage.vb:12
   BasePage.Page_PreInit(Object sender, EventArgs e) in D:\Websites\VW6\htdocs\App_Code\BasePage.vb:8
   System.Web.UI.Page.OnPreInit(EventArgs e) +11859604
   System.Web.UI.Page.PerformPreInit() +46
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1110


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