使用vb.net从客户端PC到服务器PC上载和下载文件 [英] uploading and downloading files from client pc to server pc using vb.net

查看:97
本文介绍了使用vb.net从客户端PC到服务器PC上载和下载文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

你们都可以举一个例子吗?
在使用serverpc的上载按钮进行浏览时,从客户端目录.dmp文件获取文件并将其保存到服务器pc中

源(客户端pc)和目标(服务器pc)路径的代码,语法是什么

这是从服务器完成的,如何从客户端下载文件.我们可以从它们中查看目录吗?

hi all,

can u all suggest an example
on browsing using upload button from serverpc , get the files from client directory .dmp files and save it into server pc

what would be the code, syntax of source(client pc ) and destination(serverpc) paths

this is done from server how to download the files from client .can we see the directories from them

推荐答案

如果可以是FTP客户端和FTP服务器,则是专门为此类服务器设计的东西.
您可以使用一台可用的FTP服务器,也可以使用VB.NET编写一台.
您可以使用一个可用的FTP客户端,也可以使用VB.NET编写一个.

源路径和目标路径:任何您想要的.到/从服务器传输文件的方向(上传/下载):任何您想要的.

可以使用类System.Net.Sockets.TcpListener来实现FTP服务器的代码.客户端部分的代码应使用类System.Net.FtpWebRequestSystem.Net.FtpWebResponse.您将能够找到包括VB.NET在内的不同语言的客户端代码的工作示例,但是FTP服务器项目可能需要一些艰苦的工作.

您还需要在线程处理方面有一个很好的命令,尤其是对于服务器.

这些方向已经足够入门.

我认为没有人会同意为您编写代码,但是在许多地方都可以找到代码示例,包括Microsoft和CodeProject网站. Google,MSDN和CodeProject搜索是您的朋友.有关FTP的一般信息以及进一步参考,可以在以下位置找到: http://en.wikipedia.org/wiki/FTP [ ^ ].可以在此处找到更多说明: Microsoft-Q209354 .

祝你好运!
—SA
If could be FTP client and FTP server, specially designed for such things.
You can use one of available FTP servers or write one using your VB.NET.
You can use one of available FTP clients or write one using your VB.NET.

Source and destination paths: whatever you want. Direction of the file transfer to/from the server (upload/download): whatever you want.

The code of FTP server can be implemented using the class System.Net.Sockets.TcpListener. The code of client part should use the class System.Net.FtpWebRequest and System.Net.FtpWebResponse. You will be able to find working samples of client code in different languages including VB.NET, but the FTP server project may require some hard work.

You also need to have a good command in threading, especially for the server.

These directions are quite enough to get started.

I don''t think anyone will agree to write the code for you, but the code samples could be found in many places including Microsoft and CodeProject sites. Google, MSDN and CodeProject search are your friends. General information on FTP and further referenced can be found here: http://en.wikipedia.org/wiki/FTP[^]. Further directions can be found here: Microsoft-Q209354.

Good luck!
—SA


这篇关于使用vb.net从客户端PC到服务器PC上载和下载文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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