lcXml = lcStreamReader.ReadToEnd()lcXml is defined as a String. lcStreamReader is containing a dataset which has been converted into a XML and then to it. At that point, I already changed the code to use a string builder approach instead of lcXml. With the lcXml, this is giving me an OutOfMemory exception. I have about 7000 records which contain a lot of fields in that dataset. If I have a little less than that, I am not running into the OutOfMemory exception. With the change of code, I did not have the time to test if this will help so far.
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(Char[] value, Int32 startIndex, Int32 charCount) at System.IO.StreamReader.ReadToEnd()