I work on asp.net core 3.1 web api
I get exception error as below :
Exception The target file is a directory, not a file. on file.copy
this lines generated exception
System.IO.File.Copy(OutputfilePath, Path.Combine(exportDirectory, fileName), true);
two files can access and open it when i open on fil explorer but issue
as above
so How to solve this issue please ?
what i try as below :


Sachin SinghRank #66 · 26.2K reputationPosted May 25, 2021, 7:30 AM EDT
ahmed elbarbaryRank #1,060 · 1.8K reputationPosted May 25, 2021, 7:34 AM EDT
Sachin SinghRank #66 · 26.2K reputationPosted May 25, 2021, 7:42 AM EDT
ahmed elbarbaryRank #1,060 · 1.8K reputationPosted May 25, 2021, 8:44 AM EDT