如何使用C#访问远程文件系统 [英] How to access remote file system using c#

查看:306
本文介绍了如何使用C#访问远程文件系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何访问远程文件目录.我想不共享就访问远程文件目录
我只想只使用系统的IP地址.

[从非解决方案进行编辑]
实际上我想建立像teamviewer ..这样的应用程序,这就是为什么我需要基于ip地址访问远程文件系统的原因. [/Edit]

解决方案

您不能.
出于一个很好的理由,如果可以的话,其他所有人也可以,并且安全性将立即消失.客户.

客户
-在窗口中显示远程计算机的UI,并
-在此转移用户互动.

服务器
-在远程计算机上运行,​​
-执行从客户端收到的用户交互,
-将UI更改传输到客户端

由于必须始终提供服务器软件,因此您可以自由地以各种可以想象的方式与客户端进行通信.无需让客户端以某种方式"读取远程计算机的文件系统.这是由服务器完成的.


How to access remote file directories. I want to access remote file directories without sharing
I just want to use ip address of the system only.

[Edit from non-solution]
actually m wanna to build up an application like teamviewer..and that''s why i need to access the remote file system on the basis of ip address.
[/Edit]

解决方案

You can''t.
For the very good reason that if you could, so could everyone else, and security would go right out the window.


A program "like teamviewer" always has two components, a server and a client.

The client
- displays the remote computer''s UI in a window and
- transfers user interactions there.

The server
- runs on the remote machine,
- executes the user interactions it receives from the client and
- transfers UI changes to the client

Since you have to provide the server software anyways, you''re free to make it comunicate in every imaginable way with the client. There''s no need to get the client to "somehow" read the remote computer''s file system. That is done by the server.


这篇关于如何使用C#访问远程文件系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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