I'm coding in C#, but I think the issue is more of a general Windows programming issue than C# specific.

I am writing a program to clean up the residue of deleted accounts and what I'm trying to delete are extraneous profiles (ie., a profile with no corresponding account). The program runs on a domain controller and the profiles are on another server which is just a domain member. I can delete the profiles from that server directly, but when I try to delete them via program control from the domain controller, using the full UNC, I get permission denied errors. I am doing (more like trying to do) a recursive delete using the DirectoryInfo.delete(true) syntax in C#.

Is there something special I need go do because these are profiles? Any suggestions would be most appreciated.

Thanks,
Rob