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 318:                                        Dim _prodottoRewrite As String = _arrayUrl(_arrayUrl.Length - 3)
Line 319:
Line 320:                                        Dim _categoriaID As Integer = _arrayUrl(_arrayUrl.Length - 4)
Line 321:                                        Dim _categoriaRewrite As String = _arrayUrl(_arrayUrl.Length - 5)
Line 322:

Source File: C:\inetpub\wwwroot\OliviOnLine\global.asax    Line: 320

Stack Trace:


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

[InvalidCastException: Conversion from string "olive-trees" to type 'Integer' is not valid.]
   Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value) +248
   ASP.global_asax.Application_BeginRequest(Object sender, EventArgs e) in C:\inetpub\wwwroot\OliviOnLine\global.asax:320
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +144
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +50
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +73


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