ASP Postback Issues

liunx

Guest
I am trying to take a large amount of data in a hidden form field and post it back to the server.

The problem I am having is when the size of the data reaches a certian size (usually > 1MB) I get a file cannot be downloaded error (See Attachment). I have researched this and cannot find anything that states limitations on postbacks.

Any Suggestions, my code is below


Response.Buffer = True
Response.Clear()
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-Disposition", "attachment;filename=ReportData.csv"
Response.Write(Request.Form("CSVData"))
Response.EndYour reaching the limit of the buffer on IIS. Your best bet is to stream the file back out using

Response.WriteFile();yea thats what I was afraid of. So there is not workaround for my instance. I'm not allowed to store this information on the server due to company HIPAA policies unfortunately.

I just told them they have to pull the data by date range in smaller chunks.

Thanks for answering my question.You do not have to use a

MemoryStream mem = new MemoryStream();

I forget off hand how to insert the data into the steam.

but Response.WriteFile(); can handle any type of stream data.Originally posted by rdove
I just told them they have to pull the data by date range in smaller chunks.
You'll still have to safeguard against those smaller chunks potentially exceeding the 1MB at some point in the future.
 
Back
Top