[英]Logon failure: unknown user name or bad password while creating folder in remote machine
I'm trying to create a folder on remote machine (computer is in same network). 我正在尝试在远程计算机(计算机在同一网络中)上创建一个文件夹。 I'm using the code, when I try to excue the code, I'm getting following error message:
我正在使用代码,当我尝试获取代码时,出现以下错误消息:
Logon failure: unknown user name or bad password.
登录失败:用户名未知或密码错误。
Can any one suggest me how to create a folder on remote machine (which is in same network)? 有人可以建议我如何在远程计算机(位于同一网络中)上创建文件夹吗?
string path = @"\\16.166.187.121\c$\testingfolder\Features\Temp\";
if (!Directory.Exists(path))
{
DirectoryInfo di = Directory.CreateDirectory(path);
}
i guess something is wrong with your credential. 我想您的凭证有问题。 take a look at here: How to provide user name and password when connecting to a network share
在这里看看: 连接到网络共享时如何提供用户名和密码
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.