使用vb.net从共享驱动器打开文件 [英] Opening file from shared drive using vb.net

查看:203
本文介绍了使用vb.net从共享驱动器打开文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想打开保存在另一台服务器上的文件,并且代码一次托管在服务器上.
我们如何从客户站点打开文件进行查看.
网络上可用的一些代码仅在我们尝试从托管站点的服务器上打开文件时可用,但是相同的代码无法在文件客户端上运行.客户端对保存文件的共享文件夹具有完全权限.

I want to open files saving on another server and code is hosted at once server.
How can we open the files from client site to view.
Some code available on net working only we i try to open file from the server where site is hosted but the same code does not work file client. Client is having full persmission on the shared folder where files are saving.

推荐答案

重新命名服务器名称为serverName,共享名称为share一个文件是test.txt.使用\\serverName\share\test.txt作为文件名(统一命名约定 [
Reckoning the server name is serverName and the share''s name is share and one files is test.txt. Using \\serverName\share\test.txt as the file name (Uniform Naming Convention[^]) one should be able to access the file via Explorer or code if and only if:

  1. 用户对共享具有适当的访问权限
  2. 用户对共享所映射的服务器上的逻辑驱动器上的文件夹和文件具有适当的访问权限
  3. 可以从客户端访问(不阻止)服务器serverName的SMB端口.


问候,

曼弗雷德(Manfred)


Regards,

Manfred


这篇关于使用vb.net从共享驱动器打开文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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