Solved: how to MapPath to a parent directory through server.mappath in asp.net c#

try with this code
             Path.Combine(Directory.GetParent(Server.MapPath("")).FullName, "screenshots")
             With Server.MapPath you get your root folder, then with Directory.GetParent you get the root folder parent and finally you combine that with the "screenshot" folder using Path.Combine.
              I hope it helps.
Regards,

Popular posts from this blog

How to Delete WHM Mail Queue through SSH sent from a particular sender

how to change witribe wlan password? how to secure your witribe router

How to Delete all logs in a cpanel server - SSH