Seems like it should a really easy topic, all the examples everywhere are just a couple of lines however no decent explainations, and thus I keep running into the same error without a solution.
In short this part of the applicaion runs like so
- Pulls images from db
- Creates actual images files in a temp folder
- creates pdf with images inside of it
- now delete images that were created.
Everything works up until the delete. I keep getting the error
InnerException:
System.ArgumentException: URI formats are not supported. at System.IO.Path.NormalizePathFast(String path, Boolean fullCheck)...
I have tried a couple different ways to accomplish the delete the latest being:
foreach (string item in TempFilesList)
{
path = System.Web.HttpContext.Current.Application["baseWebDomainUrl"] + "/temp/" + item;
fileDel = new FileInfo(path);
fileDel.Delete();
}
and the try before that one was:
foreach (string item in TempFilesList)
{
File.Delete(System.Web.HttpContext.Current.Application["baseWebDomainUrl"] + "/temp/" + item);
}
TempFilesList is an array list containing the paths to the images to delete.