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 38:     {
Line 39:         //trả về danh sách sản phẩm theo mã sản phẩm
Line 40:         return context.TheLoais.FirstOrDefault(c => c.ID == ma);
Line 41:     }
Line 42: 

Source File: d:\Inetpub\vhosts\noithatphathuy.com\httpdocs\App_Code\Class\TheLoai.cs    Line: 40

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) +14291345
   System.Data.Linq.SqlClient.ObjectReaderCompiler.Compile(SqlExpression expression, Type elementType) +758
   System.Data.Linq.SqlClient.SqlProvider.GetReaderFactory(SqlNode node, Type elemType) +126
   System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query) +298
   System.Data.Linq.Table`1.System.Linq.IQueryProvider.Execute(Expression expression) +48
   TheLoai.LayTheoID(Int32 ma) in d:\Inetpub\vhosts\noithatphathuy.com\httpdocs\App_Code\Class\TheLoai.cs:40
   Vn_Product.Page_Load(Object sender, EventArgs e) in d:\Inetpub\vhosts\noithatphathuy.com\httpdocs\Vn\Product.aspx.cs:21
   System.Web.UI.Control.OnLoad(EventArgs e) +106
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3785


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