类型为 System.OutOfMemoryException 的异常。 如何解决

2025-05-21 00:07:59
推荐回答(1个)
回答1:

� 源错误:执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。 堆栈跟踪:[OutOfMemoryException: 引发类型为“System.OutOfMemoryException”的异常。] System.IO.MemoryStream.set_Capacity(Int32 value) +63 System.IO.MemoryStream.EnsureCapacity(Int32 value) +55 System.IO.MemoryStream.WriteByte(Byte value) +122 System.IO.BinaryWriter.Write(Byte value) +21 System.Web.UI.ObjectStateFormatter.SerializeValue(SerializerBinaryWriter writer, Object value) +1199 [ArgumentException: 序列化类型“System.Int32”的值“120658”时出错。]