Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In my wcf restfull service using Steam Return type. The below function Returns 1 lake
Records(Each Rows Having 18 Columns). If records more than 1 lakh its getting memory error.
C#
public Stream GetSession()
   {
       //based upon business logic send back a session id
       string sessionXml = String.Format("<Session>{0}</Session>", Guid.NewGuid().ToString());
       //Convert the stream into string
       Encoding encoding = Encoding.GetEncoding("ISO-8859-1");
       WebOperationContext.Current.OutgoingResponse.ContentType = "text/plain";
       byte[] returnBytes = encoding.GetBytes(sessionXml);
       //Send it back
       return new MemoryStream(returnBytes);
   }

But In Case I need Return at-lest 50 lakhs Records.
Please Help me.
Thanks In Advance...
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900