Add*_*ddi 5 .net unc
我正在尝试使用File.Move将文件从一个UNC位置移动到另一个UNC位置.如果目标的UNC路径恰好是本地计算机,则会爆炸(错误:拒绝访问路径).例子File.Move(@"\\someServer\path\file.txt", @"\\blah2\somewhere\file.txt").这假设有一个网络共享名称为\\ someServer,我的本地计算机名称为blah2.将\\ blah2更改为C:\并且一切都很好.
File.Move(@"\\someServer\path\file.txt", @"\\blah2\somewhere\file.txt")
ham*_*mcn 1
unc 路径中的服务器名称不应该以两个斜杠开头吗? 例如@“\\someServer\path\file.txt”
归档时间:
17 年,4 月 前
查看次数:
5736 次
最近记录:
11 年,2 月 前