Server Error in '/' Application.

The specified cast from a materialized 'System.Int32' type to a nullable 'System.Int64' type is not valid.

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.InvalidOperationException: The specified cast from a materialized 'System.Int32' type to a nullable 'System.Int64' type is not valid.

Source Error:


Line 54:                     <SearchControl:CriteriaControl ID="criteria" runat="server" />                    
Line 55:                     <br />
Line 56:                     <a href="/modules/sharesearch.aspx?url=<%=HttpUtility.UrlEncode(Page.Request.Url.AbsoluteUri)%>" rel="facebox">Share This Search</a>
Line 57:                 </td>
Line 58:                 <td class="body">

Source File: i:\Source\Projects\ADELELUCAS\toview.v1\Websites\Realestate\RELEASE\search.aspx    Line: 56

Stack Trace:


[InvalidOperationException: The specified cast from a materialized 'System.Int32' type to a nullable 'System.Int64' type is not valid.]
   System.Data.Entity.Core.Common.Internal.Materialization.ErrorHandlingValueReader`1.GetValue(DbDataReader reader, Int32 ordinal) +335
   lambda_method(Closure , Shaper ) +1058
   System.Data.Entity.Core.Common.Internal.Materialization.Coordinator`1.ReadNextElement(Shaper shaper) +381
   System.Data.Entity.Core.Common.Internal.Materialization.SimpleEnumerator.MoveNext() +88
   System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +436
   System.Linq.Enumerable.ToList(IEnumerable`1 source) +70
   ToView.RealestateControls.ResultsControl.Render(HtmlTextWriter writer) in G:\Development\PETER\Projects\ADELELUCAS\toview.v1\ToView.RealestateControls\ResultsControl.cs:148
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79
   ASP.search_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in i:\Source\Projects\ADELELUCAS\toview.v1\Websites\Realestate\RELEASE\search.aspx:56
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +117
   System.Web.UI.Page.Render(HtmlTextWriter writer) +39
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +8753


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