public ActionResult DownAttachment(string dUrl, string fileName) { try { dUrl = HttpUtility.UrlDecode(dUrl); var bytes = new System.Net.WebClient().DownloadData(dUrl); Response.ContentType = "application/octet-stream"; Response.AddHeader("Content-Disposition", "attachment; filename=" + fileName); Response.BinaryWrite(bytes); Response.Flush(); Response.End(); } catch (Exception ex) { Response.Write(""); } return new EmptyResult(); }