Server Error in '/' Application.

Value was either too large or too small for an Int32.

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.OverflowException: Value was either too large or too small for an Int32.

Source Error:


Line 467:    public static int ToInt(this object obj)
Line 468:    {
Line 469:        return Convert.ToInt32(obj);
Line 470:    }
Line 471:    public static double ToDouble(this object obj)

Source File: c:\www\listing.ca\Listing.ca\App_Code\Extensions.cs    Line: 469

Stack Trace:


[OverflowException: Value was either too large or too small for an Int32.]
   System.Convert.ToInt32(Double value) +14227606
   Extensions.ToInt(Object obj) in c:\www\listing.ca\Listing.ca\App_Code\Extensions.cs:469
   CMunicipalityCommunityPrices.Process() in c:\www\listing.ca\Listing.ca\App_Code\CMunicipalityCommunityPrices.cs:272
   CMunicipalityCommunityPrices..ctor(Db db, Schema schema) in c:\www\listing.ca\Listing.ca\App_Code\CMunicipalityCommunityPrices.cs:29
   _Default.MunicipalityCommunityPrices(Db db, Schema schema) in c:\www\listing.ca\Listing.ca\default.aspx.cs:461
   _Default.Process(Db db) in c:\www\listing.ca\Listing.ca\default.aspx.cs:118
   _Default.Page_Load(Object sender, EventArgs e) in c:\www\listing.ca\Listing.ca\default.aspx.cs:34
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1602


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