c# - Response.Write on shared hosting -


on asp.net site, build 2-3 mb csv file , try send response, do:

stringbuilder sb = new stringbuilder();                  sb.appendline("name\ttype\tnumber\tstatus");                  foreach (string county in getcounties())                 {                     list<stationitem> list = getstationitems(county);                      foreach (stationitem item in list)                     {                         sb.appendline(                             string.format(                             "{0}\t{1}\t{2}\t{3}",                             item.name, item.type, item.number, item.status));                      }                 }                  response.clear();                 response.contenttype = "text/csv";                 response.appendheader("content-disposition", "attachment; filename=stations.csv");                 response.output.write(sb.tostring());                 response.end(); 

it works perfect on localhost, when upload shared hosting, page brakes. ie says: internet explorer cannot display webpage, chrome says: webpage @ page.aspx?auto=1 might temporarily down or may have moved permanently new web address. error 103 (net::err_connection_aborted): unknown error.

what problem be, appreciate help! thanks!


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -