如何使用ASP.net C#从服务器访问共享文件夹? [英] How to Access a share folder from server using ASP.net C#?

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

问题描述

嗨朋友们,



我想要从我的电脑到服务器访问共享文件夹。但是对于访问服务器的文件夹需要输入用户名和密码。下面的代码显示了我如何推荐它的工作。但问题是,它无法运行,它显示错误



System.dll中出现'System.ComponentModel.Win32Exception'类型的异常但是未在用户代码中处理附加信息:找不到网络路径



我已经使用谷歌搜索它了。但我找不到解决它的具体解决方案。请帮我。我真的需要你的帮助...



 受保护 < span class =code-keyword> void  Button1_Click( object  sender,EventArgs e)
{
string username = server;
string pwrd = server321;
{
Process.Start( @ \\192.168.4.18 \ + username + pwrd + iso documents);
}
}

解决方案

你应该放弃下一篇文章中的步骤:

如何使用asp.net访问网络文件 [ ^ ]

Hi Friends,

I'm want to access a share folder from my computer to server. But for access a folder from server need to key in the username and password. The below code is shows how could i commend for work it. But the issues is, it cannot function, it shows error

"An exception of type 'System.ComponentModel.Win32Exception' occurred in System.dll but was not handled in user code Additional information: The network path was not found"

I'm already use google and search about it. But i could not find a specific solution for solve it. Please help me. I'm really need yours help...

protected void Button1_Click(object sender, EventArgs e)
        {
            string username = "server";
            string pwrd = "server321";
            {
                Process.Start(@"\\192.168.4.18\" + username + pwrd + "iso documents");
            }
        }

解决方案

You should fallow the steps from the next article:
How to Access Network Files using asp.net[^]


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

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