Value cannot be null.Parameter name: path1
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.IO; using System.Configuration; namespace New { public partial class DownloadFile : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString.Get("ID") != null) { Response.Clear(); Guid ID = new Guid(Request.QueryString.Get("ID")); BLL.FileSave myFile = new BLL.FileSave(); Response.ContentType = "application/x-uknown"; Response.AppendHeader("Content_Disposition", "attachment; fileName=\"" + myFile.originalName + "\""); if (myFile.containsFile) { Response.BinaryWrite(myFile.fileData); } else { //the error is here Response.WriteFile(Path.Combine(Bll.AppConfiguration.UploadsFolder, myFile.fileUrl)); } } } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)