Search code examples
asp.net-mvchttpresponsefilehelpers

HttpResponse truncating output


FileHelperEngine engine = new FileHelperEngine(typeof(OrderCsvRow));

var writer = new StreamWriter(Response.OutputStream);

engine.WriteStream(writer, someOrders);

When I output the orders as a string it comes out fine. when I use Response.OutputSteam as in the code snipped the response it truncated towards the end - always at the same place.

How do I fix this?


Solution

  • Fixed...

    engine.WriteStream(Response.Output, someOrders);