Jun 03, 2014, 1:09 PM
App.direct - Response error
Hi, I have App.direct function that goes to server to generate an Excel document to the client:
Failed to load resource: net::ERR_INCOMPLETE_CHUNKED_ENCODING
Some time ago I used to use above asp.net methods and it all worked fine when I was calling to the server using Store OnSubmitData event.
I had to use some other way around because I couldn't find a way to pass my custom parameters to the server.
So I've started to use App.direct,m but it throws above error.
How can I solve this problem?
App.direct.GridPanel_PD_ExportToExcel(visibleColumnDefinitionsJSON, Store_PD_Data_JSON);
Than, on the server side I generate Execel file and I write it to the response: this.Response.Clear();
this.Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
this.Response.AddHeader("Content-Disposition",
string.Format("attachment; filename=\"{0}.xlsx\"",
SR.ProfileDataCompl_Panel_Title(searchPanel.selected_DateFrom.ToString("yyyy-MM-dd"), searchPanel.selected_DateTo.ToString("yyyy-MM-dd"))
));
Response.BinaryWrite(excel);
Response.Flush();
Response.Close();
When it returns to the client browser, instead of start downloading this file I get an error in browser console:Failed to load resource: net::ERR_INCOMPLETE_CHUNKED_ENCODING
Some time ago I used to use above asp.net methods and it all worked fine when I was calling to the server using Store OnSubmitData event.
I had to use some other way around because I couldn't find a way to pass my custom parameters to the server.
So I've started to use App.direct,m but it throws above error.
How can I solve this problem?
Last edited by WojciechK; Jun 03, 2014 at 1:14 PM.