C# 共享目录如何登录

NASUser:共享目录用户名
NASPwd:共享目录用户的密码
NASPath:共享目录路径
IsNAS:true

//*********************************************************
bool isNas = true;
if (isNas)
{
string strNasPath = “\192.168.1.53\public”;
string strNasUser = “admin”;
string strNasPwd = “admin”;
try
{
if (!connectState(strNasPath, strNasUser, strNasPwd))
{
Console.WriteLine("Read net folder error.");
Console.ReadLine();
return;
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
Console.ReadLine();
return;
}
}

posted @ 2020-08-31 19:10  SelenaZhou  阅读(532)  评论(0编辑  收藏  举报