Just to test for the possibility of it being a security context issue, I invoked the C# program from the command line and again got the permission denied error. I then attempted to delete the profile from within the same command window using the DOS rmdir /S command with the full UNC path to the profile on the other system. It asked me if I was sure and then successfully deleted the directory -- no permissions issues.

So, if it is a security context issue, that would mean that a .NET program runs under a different context than the user that invoked it, even though it was invoked from a command prompt. Is that the case? And if so, where do I look to fix it?

Thanks,
Rob