如何通过 Web 访问网络驱动器?

发布于 2024-08-20 15:32:01 字数 490 浏览 13 评论 0原文

我们有大约 2000 名员工。每个人都有一个共享驱动器来存储一些文件。该共享驱动器指向我们网络上的中心位置。

示例:

John 的 F:drive -> \\我们的网络\john.doe
Jane's F: 驾驶 -> \\ournetwork\jane.doe

每个用户在根目录“ournetwork”中都会有一个标有其用户名的文件夹。我不必担心目录创建,因为这已经为我完成了。这些用户都绑定到我们的 AD 中进行身份验证。文件夹名称 == AD 用户名。

我们希望能够允许我们的用户通过网页从我们的网络外部访问其映射的“F”驱动器。我知道所涉及的编程(假设涉及到这一点)将不依赖于它们的映射驱动器,而是依赖于上面发布的 UNC 路径。

我愿意接受有关如何实现这一目标的建议。 ASP.NET?是否只有像 WebDAV 这样的 IIS 解决方案? (尽管 win 7 上的客户端 WebDAV 似乎已损坏,因此可能不可行)。还有别的事吗?

谢谢。

We have around 2000 staff. Each has a shared drive to store some of their files. This shared drive points to a central location on our network.

Example:

John's F: drive -> \\ournetwork\john.doe
Jane's F: drive -> \\ournetwork\jane.doe

Each user will have a folder within the root "ournetwork" labeled with their username. I do not have to worry about the directory creation as that's already done for me. These users are all tied into our AD for authentication. Folder name == AD username.

We would like the ability to allow our users to access their mapped "F" drive from outside our network through a web page. I understand that the programming involved (assuming it comes to that) will not rely on their mapped drive but rather the UNC path as posted above.

I am open to suggestions on how to get this accomplished. ASP.NET? Is there just an IIS solution like WebDAV? (although client-side WebDAV on win 7 seems to be broken, so that may be off the table). Something else?

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

孤独陪着我 2024-08-27 15:32:01

您可以像在其他地方一样指定网络上的文件名称:

Dim myStream As IO.FileStream = IO.File.Open("\\myserver\myshare\myfile", IO.FileMode.Open)
将 myBytes 调暗为 Byte()
myStream.Read(myBytes, 0, numberOfBytesToRead)

棘手的部分是确保您以具有访问权限的帐户访问该文件。通常,ASP.net 代码作为权限有限的“匿名”或“系统”帐户运行。您需要指定 ASP.net 页面以有权访问该文件的特定用户身份运行。然后,您需要在 web.config 文件中启用模拟,以便 ASP.net 能够以该用户的身份实际访问该文件。

You specify the name of the file on the network just like you do from anywhere else:

Dim myStream As IO.FileStream = IO.File.Open("\\myserver\myshare\myfile", IO.FileMode.Open)
Dim myBytes As Byte()
myStream.Read(myBytes, 0, numberOfBytesToRead)

The tricky part is making sure that you access the file as an account that has access. Normally, ASP.net code runs as an 'anonymous' or 'system' account with limited priviliges. You need to specify that the ASP.net page run as a certain user with access to the file. Then, you need to enable impersonation in your web.config file in order for ASP.net to actually access the file as that user.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文