HttpContext Wierd Values
Posted on 2013-01-02
I writing out the content to HTTP response and I’m adding the header type as CSV. The exports works fine in local, QA and staging but in production I see a hex value at the beginning and 0 at the end. Since I’m not able to reproduce the same in local or QA I’m having a hard time debugging this. Have any of you seen this before ?
This is how I’m writing to response stream. The UI makes an http post to the ExportCSV.
public void ExportCSV()
HttpContextBase context = HttpContext;
context.Response.ContentType = "text/csv";
context.Response.AddHeader("Content-Disposition", "attachment; filename=" + "xxx" + Guid.NewGuid().ToString() + ".csv");
This is what I’m seeing in the export
22d (Hex value proportional to content length)