Good afternoon, I am generating a file with Asp net the function saved in HD if I put the path, however this file will be saved on a server and I am having difficulty to place the relative path of the location where this file will be saved, I do not know if I'm using the correct function because I'm new.
function I'm using:
string[] lines = {ENAME, FNAME,LNAME };
System.IO.File.WriteAllLines(@"~/WriteLines.csv", lines);
error generated:
Exception Details: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C: \ Program Files (x86) \ IIS Express \ ~ \ WriteLines.csv'.