Server Error in '/' Application.

Exception of type 'System.OutOfMemoryException' was thrown.

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.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.]
   System.Runtime.CompilerServices.RuntimeHelpers._CompileMethod(IRuntimeMethodInfo method) +0
   System.Reflection.Emit.DynamicMethod.CreateDelegate(Type delegateType, Object target) +40
   System.Linq.Expressions.Compiler.LambdaCompiler.CreateDelegate() +107
   System.Linq.Expressions.Compiler.LambdaCompiler.Compile(LambdaExpression lambda, DebugInfoGenerator debugInfoGenerator) +142
   System.Data.Objects.ELinq.FuncletizingVisitor.CompileExpression(Expression expression) +77
   System.Data.Objects.ELinq.FuncletizingVisitor.InlineValue(Expression expression, Boolean recompileOnChange) +261
   System.Data.Objects.ELinq.FuncletizingVisitor.Visit(Expression exp) +352
   System.Linq.Expressions.EntityExpressionVisitor.VisitMethodCall(MethodCallExpression m) +31
   System.Linq.Expressions.EntityExpressionVisitor.Visit(Expression exp) +263
   System.Data.Objects.ELinq.FuncletizingVisitor.Visit(Expression exp) +388
   System.Linq.Expressions.EntityExpressionVisitor.VisitBinary(BinaryExpression b) +41
   System.Linq.Expressions.EntityExpressionVisitor.Visit(Expression exp) +495
   System.Data.Objects.ELinq.FuncletizingVisitor.Visit(Expression exp) +388
   System.Linq.Expressions.EntityExpressionVisitor.VisitLambda(LambdaExpression lambda) +25
   System.Linq.Expressions.EntityExpressionVisitor.Visit(Expression exp) +308
   System.Data.Objects.ELinq.FuncletizingVisitor.Visit(Expression exp) +388
   System.Linq.Expressions.EntityExpressionVisitor.VisitUnary(UnaryExpression u) +18
   System.Linq.Expressions.EntityExpressionVisitor.Visit(Expression exp) +128
   System.Data.Objects.ELinq.FuncletizingVisitor.Visit(Expression exp) +388
   System.Linq.Expressions.EntityExpressionVisitor.VisitExpressionList(ReadOnlyCollection`1 original) +57
   System.Linq.Expressions.EntityExpressionVisitor.VisitMethodCall(MethodCallExpression m) +55
   System.Linq.Expressions.EntityExpressionVisitor.Visit(Expression exp) +263
   System.Data.Objects.ELinq.FuncletizingVisitor.Visit(Expression exp) +388
   System.Linq.Expressions.EntityExpressionVisitor.VisitExpressionList(ReadOnlyCollection`1 original) +57
   System.Linq.Expressions.EntityExpressionVisitor.VisitMethodCall(MethodCallExpression m) +55
   System.Linq.Expressions.EntityExpressionVisitor.Visit(Expression exp) +263
   System.Data.Objects.ELinq.FuncletizingVisitor.Visit(Expression exp) +388
   System.Data.Objects.ELinq.Funcletizer.Funcletize(Expression expression, Func`1& recompileRequired) +469
   System.Data.Objects.ELinq.ExpressionConverter..ctor(Funcletizer funcletizer, Expression expression) +166
   System.Data.Objects.ELinq.ELinqQueryState.CreateExpressionConverter() +44
   System.Data.Objects.ELinq.ELinqQueryState.GetExecutionPlan(Nullable`1 forMergeOption) +253
   System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) +135
   System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator() +37
   System.Data.Entity.Internal.Linq.InternalQuery`1.GetEnumerator() +72
   System.Data.Entity.Infrastructure.DbQuery`1.System.Collections.Generic.IEnumerable<TResult>.GetEnumerator() +40
   System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +174
   System.Linq.Enumerable.ToList(IEnumerable`1 source) +61
   Profile.Data.Services.UserRelationService`2.GetUpperCompanies(Int32 profileId, Boolean inner, Boolean includeLeaders) +2532
   Profile.Data.Services.UserRelationService`2.GetUpperCompaniesWithLeaders(Int32 profileId) +90
   rep.SiteMaster.Page_Load(Object sender, EventArgs e) in C:\Users\User\source\repos\Project4\RealEstatePortal\RealEstatePortal\Site.Master.cs:239
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


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