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 21:             listId = bilId.Split('.').First();
Line 22:         }
Line 23:         Attityde.Carskin.Code.Model.Vehicle bil = BillisteHelper.GetBil(Convert.ToInt32(listId), bilId);
Line 24: 
Line 25:         if (bil != null)

Source File: C:\www\carskin15\www\public\Views\MacroPartials\FacebookMeta.cshtml    Line: 23

Stack Trace:


[FormatException: Input string was not in a correct format.]
   System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +14542542
   System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +174
   System.Convert.ToInt32(String value) +64
   ASP._Page_Views_MacroPartials_FacebookMeta_cshtml.Execute() in C:\www\carskin15\www\public\Views\MacroPartials\FacebookMeta.cshtml:23
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +252
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +148
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +122
   Umbraco.Web.Mvc.ProfilingView.Render(ViewContext viewContext, TextWriter writer) in D:\a\1\s\src\Umbraco.Web\Mvc\ProfilingView.cs:25
   Umbraco.Web.Mvc.ControllerExtensions.RenderViewResultAsString(ControllerBase controller, ViewResultBase viewResult) in D:\a\1\s\src\Umbraco.Web\Mvc\ControllerExtensions.cs:80
   Umbraco.Web.Macros.PartialViewMacroEngine.Execute(MacroModel macro, IPublishedContent content) in D:\a\1\s\src\Umbraco.Web\Macros\PartialViewMacroEngine.cs:98
   Umbraco.Web.Macros.<>c__DisplayClass17_0.<ExecuteMacroOfType>b__0() in D:\a\1\s\src\Umbraco.Web\Macros\MacroRenderer.cs:335
   Umbraco.Web.Macros.MacroRenderer.ExecuteProfileMacroWithErrorWrapper(MacroModel macro, String msgIn, Func`1 getMacroContent, Func`1 msgErr) in D:\a\1\s\src\Umbraco.Web\Macros\MacroRenderer.cs:306
   Umbraco.Web.Macros.MacroRenderer.ExecuteMacroWithErrorWrapper(MacroModel macro, String msgIn, String msgOut, Func`1 getMacroContent, Func`1 msgErr) in D:\a\1\s\src\Umbraco.Web\Macros\MacroRenderer.cs:265
   Umbraco.Web.Macros.MacroRenderer.ExecuteMacroOfType(MacroModel model, IPublishedContent content) in D:\a\1\s\src\Umbraco.Web\Macros\MacroRenderer.cs:332
   Umbraco.Web.Macros.MacroRenderer.Render(MacroModel macro, IPublishedContent content, IDictionary pageElements) in D:\a\1\s\src\Umbraco.Web\Macros\MacroRenderer.cs:238
   Umbraco.Web.UmbracoComponentRenderer.RenderMacro(String alias, IDictionary`2 parameters, IPublishedContent content) in D:\a\1\s\src\Umbraco.Web\UmbracoComponentRenderer.cs:116
   ASP._Page_Views_master_cshtml.Execute() in C:\www\carskin15\www\public\Views\master.cshtml:36
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +252
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +148
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +122
   System.Web.WebPages.<>c__DisplayClass40_0.<RenderPageCore>b__0(TextWriter writer) +309
   System.Web.WebPages.WebPageBase.Write(HelperResult result) +108
   System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action`1 body) +89
   System.Web.WebPages.WebPageBase.PopContext() +310
   Umbraco.Web.Mvc.ProfilingView.Render(ViewContext viewContext, TextWriter writer) in D:\a\1\s\src\Umbraco.Web\Mvc\ProfilingView.cs:25
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +378
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +91
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +795
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +795
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +795
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +81
   System.Web.Mvc.Async.<>c__DisplayClass3_1.<BeginInvokeAction>b__1(IAsyncResult asyncResult) +188
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +38
   System.Web.Mvc.<>c.<BeginExecuteCore>b__152_1(IAsyncResult asyncResult, ExecuteCoreState innerState) +29
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +73
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +52
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +39
   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +38
   System.Web.Mvc.<>c.<BeginProcessRequest>b__20_1(IAsyncResult asyncResult, ProcessRequestState innerState) +43
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +73
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +38
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +651
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +220
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +134


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