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 22:                 var sd = (TCDirect.Model.Business.Objects.SessionDetails)HttpContext.Current.Items["TCSessionGuid"];
Line 23:                 var sm = TCDirect.Model.Business.Services.SessionManager.Current;
Line 24:                 sm.AddOrUpdate(sd);
Line 25:             }
Line 26:         }

Source File: f:\www\newtcde\Global.asax    Line: 24

Stack Trace:


[OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.]
   Newtonsoft.Json.Utilities.ConvertUtils..cctor() +0

[TypeInitializationException: The type initializer for 'Newtonsoft.Json.Utilities.ConvertUtils' threw an exception.]
   Newtonsoft.Json.Utilities.ConvertUtils.GetTypeCode(Type t, Boolean& isEnum) +32
   Newtonsoft.Json.Utilities.EnumUtils.ToUInt64(Object value) +31
   Newtonsoft.Json.Utilities.EnumUtils.InitializeValuesAndNames(StructMultiKey`2 key) +136
   System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory) +86
   Newtonsoft.Json.Utilities.EnumUtils.GetEnumValuesAndNames(Type enumType) +48
   Newtonsoft.Json.JsonWriter.BuildStateArray() +97
   Newtonsoft.Json.JsonWriter..cctor() +533

[TypeInitializationException: The type initializer for 'Newtonsoft.Json.JsonWriter' threw an exception.]
   Newtonsoft.Json.JsonWriter..ctor() +0
   Newtonsoft.Json.JsonTextWriter..ctor(TextWriter textWriter) +16
   Newtonsoft.Json.JsonConvert.SerializeObjectInternal(Object value, Type type, JsonSerializer jsonSerializer) +125
   Newtonsoft.Json.JsonConvert.SerializeObject(Object value) +22
   TCDirect.Model.Business.Objects.SessionDetails.ToBase64() in F:\work\tc\sitebackups\www\TCDirect.Model\Objects\SessionDetails.cs:30
   TCDirect.Model.Business.Services.SessionManager.Update(SessionDetails session) in F:\work\tc\sitebackups\www\TCDirect.Model\Services\SessionManager.cs:71
   TCDirect.Model.Business.Services.SessionManager.AddOrUpdate(SessionDetails sessionDetails) in F:\work\tc\sitebackups\www\TCDirect.Model\Services\SessionManager.cs:99
   ASP.global_asax.Application_EndRequest(Object sender, EventArgs e) in f:\www\newtcde\Global.asax:24
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +144
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +50
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +73


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