I keep getting this error when trying to create a directory:
System.IO.DirectoryNotFoundException: ‘Could not find a part of the path ‘C:Userstp_resourcerepossoppingaMVCsoppingaMVCwwwrootproductImages’.’
The code:
System.IO.File.Create(Directory.GetCurrentDirectory() + @"wwwrootproductImages" + HttpContext.Session.GetString("guid"));
This is the folder setup in my visual studio:
Not sure the path looks correct, but getting the error, am I missing something?
The files Physical location
3
System.IO.Directory.CreateDirectory(Directory.GetCurrentDirectory() + @"wwwrootproductImages" + HttpContext.Session.GetString("guid"));
1