I have file that i converted and inserted it to my DB:
byte[] file = File.ReadAllBytes(outputpath);
string filesting = Convert.ToBase64String(file);
//INSERT INTO DB
Then I pull it from the DB and try to download it.
byte[] bytes = Convert.FromBase64String(file);
HttpContext.Current.Response.ContentType = "application/force-download";
HttpContext.Current.Response.AddHeader("content-disposition", "attachment;filename=labtest.avi");
HttpContext.Current.Response.BinaryWrite(bytes);
HttpContext.Current.Response.End();
But nothing is downloaded.
Why?