Solved: how to MapPath to a parent directory through server.mappath in 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.

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

SOLVED: WHM/CPANEL Your server does not support the connection encryption type you have specified. Try changing the encryption method