Pessoal,
Na minha maquina funciona normal, porém quando coloco no locaweb dá o erro: "A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed
to response"
O que pode ser?
if (e.CommandName.Equals("Link"))
{
int index = Convert.ToInt32(e.CommandArgument);
GridViewRow gvrow = GridViewResultados.Rows[index];
string url = gvrow.Cells[7].Text;
string NomeArquivo = HttpUtility.HtmlDecode(gvrow.Cells[9].Text.Replace(".", ""));
using (var client = new WebClient())
{
var buffer = client.DownloadData(url);
Response.ContentType = "application/pdf";
Response.AppendHeader("Content-Disposition", "attachment;filename="+NomeArquivo+".pdf");
Response.Clear();
Response.OutputStream.Write(buffer, 0, buffer.Length);
Response.Flush();
}
}
Luiz Henroqie