System.Drawing.Image img = System.Drawing.Image.FromStream(stream); img.Save(HttpContext.Current.Server.MapPath(outputFile));