高分跪求(分不够可另开帖加分):局域网文件传输问题解决方案及关键代码...要求如下:
在局域网中有N(50-100)台客户机,每台客户机每天会产生400-800个JPG文件(其中25%尺寸为400-500KB,75%尺寸为20-50KB)。JPG文件都存放在指定的目录下。客户机win98系统。
在局域网中有一台服务器,现在需要写个程序自动并实时地将全部客户机上的JPG文件保存一份到服务器上。保存到服务器的指定目录下并按客户机分文件夹存放。服务器win2000 server系统。注:客户机及服务器上都可做FTP服务求效率最高的解决方案及关键的部分代码,小弟在此先谢了!!!!!!!急急急!!!!求各位大侠援手............
在局域网中有N(50-100)台客户机,每台客户机每天会产生400-800个JPG文件(其中25%尺寸为400-500KB,75%尺寸为20-50KB)。JPG文件都存放在指定的目录下。客户机win98系统。
在局域网中有一台服务器,现在需要写个程序自动并实时地将全部客户机上的JPG文件保存一份到服务器上。保存到服务器的指定目录下并按客户机分文件夹存放。服务器win2000 server系统。注:客户机及服务器上都可做FTP服务求效率最高的解决方案及关键的部分代码,小弟在此先谢了!!!!!!!急急急!!!!求各位大侠援手............
当然,如果仅仅是局域网的话,可以选择的余地就更多了,开发一个smartclient,使用socket直接进行传输这样的速度就会更快!
A\可以是在服务器上运行一个程序,客户端提供ftp或共享目录,服务器的程序轮训拷贝就可以了
B\客户端安装程序,定时发送文件到服务器
Console.Write("\nPlease enter the URL to post data to : ");
String uriString = Console.ReadLine();// Create a new WebClient instance.
WebClient myWebClient = new WebClient();Console.WriteLine("\nPlease enter the fully qualified path of the file to be uploaded to the URL");
string fileName = Console.ReadLine();Console.WriteLine("Uploading {0} to {1} ...",fileName,uriString);
// Upload the file to the URL using the HTTP 1.0 POST.
byte[] responseArray = myWebClient.UploadFile(uriString,"POST",fileName);// Decode and display the response.
Console.WriteLine("\nResponse Received.The contents of the file uploaded are: \n{0}",Encoding.ASCII.GetString(responseArray));