如何访问服务器中的共享文件夹 [英] How do I access share folder in server

查看:258
本文介绍了如何访问服务器中的共享文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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)[^]


这篇关于如何访问服务器中的共享文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆