Try the code below and see if you get the same error.
string path = Server.MapPath(pdfExportPath);
if (!Directory.Exists(path))
{
Directory.CreateDirectory(path);
}
using (File.Create(Path.Combine(path, "Test.txt")));
if (Directory.Exists(path))
{
Directory.Delete(path, true);
}
Can you delete a directory manually on that server?
If not, check the access rights for the account you are using.
It is also a bit confusing as you used different paths in the different code segments.
Is this intentional or a mistake?