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 66:                 {
Line 67:                     //Получение id из имени файла
Line 68:                     int id = int.Parse(filewoext);
Line 69:                     out_string = strCurrentPath.Remove(strCurrentPath.IndexOf(virtual_page));
Line 70:                     out_string = out_string + page + "?id=" + id.ToString();

Source File: e:\rooms\u149640\morezolota.ru\www\App_Code\Utils\LinkParser.cs    Line: 68

Stack Trace:


[FormatException: Input string was not in a correct format.]
   System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +12691919
   System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +122
   System.Int32.Parse(String s) +26
   LinkParser.ParseLink(HttpRequest request, String input_link, String& out_string) in e:\rooms\u149640\morezolota.ru\www\App_Code\Utils\LinkParser.cs:68
   LinkParser.PageRedirect(HttpRequest request, HttpContext context) in e:\rooms\u149640\morezolota.ru\www\App_Code\Utils\LinkParser.cs:27
   ASP.global_asax.Application_BeginRequest(Object sender, EventArgs e) in e:\rooms\u149640\morezolota.ru\www\Global.asax:15
   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.3928.0