In ASP.NET gibt es eine einfache Möglichkeit eine Datei zum Download anzubieten:
string dateiname = HttpContext.Current.Server.MapPath("Verzeichnis/Dateiame");
System.IO.FileInfo downloadDatei = new System.IO.FileInfo(dateiname);
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment; filename=" + downloadDatei.Name);
HttpContext.Current.Response.AddHeader("Content-Length", downloadDatei.Length.ToString());
HttpContext.Current.Response.ContentType = "application/octet-stream";
HttpContext.Current.Response.WriteFile(downloadDatei.FullName);
HttpContext.Current.Response.End();