My program requires access to a certain UNC path, but the path is cross-domain, so depending on the machine the program is being run on, it may or may not have default crede
Check these articles:
I've used code like this:
new FileIOPermission(FileIOPermissionAccess.Read, path).Demand();
which is supposed to throw a SecurityException if you don't have the desired access, but for paths on network drives or UNC paths, the FileIOPermission.Demand() method appears to be a no-op.