如何访问服务器中的共享文件夹
问题描述:
protected void Button1_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start(@"\\192.168.5.12\documents");
}
我想通过网络访问另一台服务器的共享文件夹Ip是192.168.5.12但是服务器具有认证用户名和密码。我该如何通过身份验证?我不确定代码。谁能帮助我?我试过上面的代码,但它显示错误。错误是它是必需的验证密码...
I would like to access shared folder in another server through web which the Ip is 192.168.5.12 but the server have authentication username and password. How should I pass through the authentication? I'm not sure about the code. Could anyone help me? I tried above code but it shows error. the error is "it is required authentication password"...
答
您需要使用允许您指定安全信息的重载:Process.Start Method(String,String,SecureString,String) [ ^ ]
You need to use the overload which allows you to specify the security info: Process.Start Method (String, String, SecureString, String)[^]