File.Move对UNC路径无法正常工作

Add*_*ddi 5 .net unc

我正在尝试使用File.Move将文件从一个UNC位置移动到另一个UNC位置.如果目标的UNC路径恰好是本地计算机,则会爆炸(错误:拒绝访问路径).例子File.Move(@"\\someServer\path\file.txt", @"\\blah2\somewhere\file.txt").这假设有一个网络共享名称为\\ someServer,我的本地计算机名称为blah2.将\\ blah2更改为C:\并且一切都很好.

ham*_*mcn 1

unc 路径中的服务器名称不应该以两个斜杠开头吗?
例如@“\\someServer\path\file.txt”