When you write httpResponse, is there a limit on the size of the response?

I generate a CSV file on the fly in ASP.NET C # and writing it directly to the response.

private void ExportToResponse(string textCsv, string fileName) { HttpContext.Current.Response.Clear(); HttpContext.Current.Response.ContentType = "text/csv"; HttpContext.Current.Response.ContentEncoding = Encoding.Unicode; HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + fileName + ".csv"); HttpContext.Current.Response.Write(textCsv); HttpContext.Current.Response.End(); } 

And in most cases, this works well, but in some cases I get an error message ("this website cannot be displayed in Internet Explorer"). I suspect the reason is that this file is suitable for an answer. In this case, how to extend the response length limit?

I was hoping I could do this in the web.config file, similar to how you set the mexRequestLength property for the httpRuntime element (http://msdn.microsoft.com/en-us/library/e1f13641.aspx).

Thanks!

+4
source share
1 answer

See the following Microsoft Knowledge Base article for this issue.

http://support.microsoft.com/kb/812406

+2
source

Source: https://habr.com/ru/post/1402417/


All Articles