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:


Line 293:    public List<view_Menu> LayTheoIDParent(string ma)
Line 294:    {
Line 295:        var a = (from b in context.view_Menus
Line 296:                 where b.IDParent == ConvertType.ToInt32(ma) 
Line 297:                 orderby b.ViTri ascending

Source File: d:\Inetpub\vhosts\thepquoctri.com\httpdocs\App_Code\Classes\BusTheLoai.cs    Line: 295

Stack Trace:


[OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.]
   System.Runtime.CompilerServices.RuntimeHelpers._CompileMethod(IntPtr method) +0
   System.Reflection.Emit.DynamicMethod.CreateDelegate(Type delegateType, Object target) +59
   System.Linq.Expressions.ExpressionCompiler.CompileDynamicLambda(LambdaExpression lambda) +232
   System.Linq.Expressions.LambdaExpression.Compile() +43
   System.Data.Linq.SqlClient.Localizer.MakeLocal(Expression e) +251
   System.Data.Linq.SqlClient.ExpressionVisitor.VisitBinary(BinaryExpression b) +46
   System.Data.Linq.SqlClient.ExpressionVisitor.Visit(Expression exp) +182
   System.Data.Linq.SqlClient.ExpressionVisitor.VisitLambda(LambdaExpression lambda) +21
   System.Data.Linq.SqlClient.ExpressionVisitor.Visit(Expression exp) +577
   System.Data.Linq.SqlClient.ExpressionVisitor.VisitUnary(UnaryExpression u) +21
   System.Data.Linq.SqlClient.ExpressionVisitor.Visit(Expression exp) +128
   System.Data.Linq.SqlClient.ExpressionVisitor.VisitExpressionList(ReadOnlyCollection`1 original) +71
   System.Data.Linq.SqlClient.ExpressionVisitor.VisitMethodCall(MethodCallExpression m) +48
   System.Data.Linq.SqlClient.ExpressionVisitor.Visit(Expression exp) +519
   System.Data.Linq.SqlClient.ExpressionVisitor.VisitExpressionList(ReadOnlyCollection`1 original) +71
   System.Data.Linq.SqlClient.ExpressionVisitor.VisitMethodCall(MethodCallExpression m) +48
   System.Data.Linq.SqlClient.ExpressionVisitor.Visit(Expression exp) +519
   System.Data.Linq.SqlClient.Funcletizer.Funcletize(Expression expression) +85
   System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query) +71
   System.Data.Linq.DataQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator() +45
   System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +471
   System.Linq.Enumerable.ToList(IEnumerable`1 source) +78
   BusTheLoai.LayTheoIDParent(String ma) in d:\Inetpub\vhosts\thepquoctri.com\httpdocs\App_Code\Classes\BusTheLoai.cs:295
   Vn_Control_Danhmuc.showmenu() in d:\Inetpub\vhosts\thepquoctri.com\httpdocs\Vn\Control\Danhmuc.ascx.cs:39
   Vn_Control_Danhmuc.Page_Load(Object sender, EventArgs e) in d:\Inetpub\vhosts\thepquoctri.com\httpdocs\Vn\Control\Danhmuc.ascx.cs:18
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42
   System.Web.UI.Control.OnLoad(EventArgs e) +132
   System.Web.UI.Control.LoadRecursive() +66
   System.Web.UI.Control.LoadRecursive() +191
   System.Web.UI.Control.LoadRecursive() +191
   System.Web.UI.Control.LoadRecursive() +191
   System.Web.UI.Control.LoadRecursive() +191
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428


Version Information: Microsoft .NET Framework Version:2.0.50727.8964; ASP.NET Version:2.0.50727.8962