there is only one response file per http request. Disabling buffering usually improves memory usage, but only a little in actual time. you probably need to make pdf generation faster. You could also just increase the timeout for the request.
Response.Write PDF page by page to avoid timeout excepction
Hello, everybody
I have a page which Response.Content is "application/pdf"
This PDF is returned by a lot of api requests putting files together in an unique Byte Array variable. Sometimes, the return could last too much time and pdf file could have lots of megabytes of size.
Because of company restrictions, sometimes, the page returns a timeout exception, and we don't have any margin to increase timeout.
Every request (or every file) has maximum 3 or 4 pages. So, I thought if I can write a code that writes a response file by file without buffering a page (response.buffer = false), using the same resource available to write text, I could fix the problem. But, after some tests I've realized that response.binary write does not work without buffer, and just one file is returned to page.
Is anyone have an a idea to fix this problem?
Thank's in advance