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:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

  <%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
   <system.web>
       <compilation debug="true"/>
   </system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

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) +55
   System.Linq.Expressions.Compiler.LambdaCompiler.Compile(LambdaExpression lambda, DebugInfoGenerator debugInfoGenerator) +161
   System.Data.Entity.Core.Objects.ELinq.FuncletizingVisitor.CompileExpression(Expression expression) +95
   System.Data.Entity.Core.Objects.ELinq.FuncletizingVisitor.InlineValue(Expression expression, Boolean recompileOnChange) +274
   System.Data.Entity.Core.Objects.ELinq.FuncletizingVisitor.Visit(Expression exp) +398
   System.Linq.Expressions.EntityExpressionVisitor.VisitMethodCall(MethodCallExpression m) +39
   System.Data.Entity.Core.Objects.ELinq.FuncletizingVisitor.Visit(Expression exp) +434
   System.Linq.Expressions.EntityExpressionVisitor.VisitLambda(LambdaExpression lambda) +22
   System.Data.Entity.Core.Objects.ELinq.FuncletizingVisitor.Visit(Expression exp) +434
   System.Linq.Expressions.EntityExpressionVisitor.VisitUnary(UnaryExpression u) +22
   System.Data.Entity.Core.Objects.ELinq.FuncletizingVisitor.Visit(Expression exp) +434
   System.Linq.Expressions.EntityExpressionVisitor.VisitExpressionList(ReadOnlyCollection`1 original) +98
   System.Linq.Expressions.EntityExpressionVisitor.VisitMethodCall(MethodCallExpression m) +70
   System.Data.Entity.Core.Objects.ELinq.FuncletizingVisitor.Visit(Expression exp) +434
   System.Data.Entity.Core.Objects.ELinq.Funcletizer.Funcletize(Expression expression, Func`1& recompileRequired) +596
   System.Data.Entity.Core.Objects.ELinq.ExpressionConverter..ctor(Funcletizer funcletizer, Expression expression) +102
   System.Data.Entity.Core.Objects.ELinq.ELinqQueryState.CreateExpressionConverter() +91
   System.Data.Entity.Core.Objects.ELinq.ELinqQueryState.GetExecutionPlan(Nullable`1 forMergeOption) +274
   System.Data.Entity.Core.Objects.<>c__DisplayClass7.<GetResults>b__6() +42
   System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction(Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) +462
   System.Data.Entity.Core.Objects.<>c__DisplayClass7.<GetResults>b__5() +215
   System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Func`1 operation) +234
   System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) +352
   System.Data.Entity.Core.Objects.ObjectQuery`1.<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__0() +31
   System.Data.Entity.Internal.LazyEnumerator`1.MoveNext() +39
   System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +469
   System.Linq.Enumerable.ToList(IEnumerable`1 source) +69
   Ascentis.Ecommerce.CoreLibrary.Website.SiteServices.ContentService.GetPublishedContentsBySelectorId(String selectorid, Boolean includebanner, Boolean includeproductlist, eCommerceEntities& ctx, Int32 brandid, String searchkey, Int32 userGender, Int32 categoryId, Boolean populateCategoryInfo) +3322
   Ascentis.Ecommerce.CoreLibrary.Website.SiteServices.ContentService.GetPublishedBannersBySelectorId(String selectorid, eCommerceEntities& ctx, Int32 brandid, Int32 userGender, Int32 categoryId, Boolean populateCategoryInfo) +145
   MainSite.Page_Init(Object sender, EventArgs e) +1698
   System.Web.UI.Control.OnInit(EventArgs e) +104
   System.Web.UI.Control.InitRecursive(Control namingContainer) +457
   System.Web.UI.Control.InitRecursive(Control namingContainer) +224
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1152


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