string fileName = string.Empty;
if (fuFranchiseImage.HasFile == true)
fileName = DateTime.Now.ToString("MM-dd-yyyy_HHmmss");
string fileExtension = System.IO.Path.GetExtension(this.fuFranchiseImage.FileName).ToString();
fileName = fileName + fileExtension;
string filePath = Server.MapPath(@"~\images\" + fileName);
Here i'm trying to save images into images folder in the application, and in SQL Server i just save file name.
When I try to upload in server its getting error like this
Access to the path 'D:\Hosting\12374540\html\report\images\04-10-2014_000650.jpg' is denied.
Please could anyone help me to solve this problem
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)