当用WebService返回大数据时,会出现如下错误:
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at System.String.GetStringForStringBuilder(String value, Int32 startIndex, Int32 length, Int32 capacity)
at System.Text.StringBuilder.GetNewString(String currentString, Int32 requiredLength)
at System.Text.StringBuilder.Append(String value)
……
是由于StringBuilder 中内存不足,可看MSDN上的说明
http://blogs.msdn.com/b/vsofficedeveloper/archive/2008/10/10/stringbuilder-outofmemoryexception.aspx
当WebService返回大量数据时,可能会出现内存不足的错误。错误源于StringBuilder内存不足,这限制了数据处理能力。
792

被折叠的 条评论
为什么被折叠?



