Database query representation impersonating file on Windows share?

与世无争的帅哥 提交于 2019-12-06 06:52:59

问题


Is there any way to have something that looks just like a file on a Windows file share but is really a resource served up over HTTP?

For context, I'm working with an old app that can only deal with files on a Windows file share, I want to create a simple HTTP-based service to serve the content of the files dynamically to pick up real time changes to the underlying data on request


Thanks for the tips - I've got some research to do now...

Thanks all,


回答1:


WebDAV (basically) takes an existing directory, and shares it over HTTP - which sounds like the opposite of what you want.

You need something that speaks SMB/CIFS on one end, and your own code on the other. The easiest way to do that is with a userspace file system.

To that end, here's a couple of links:

  1. WinFUSE, which is kind of a barebones CIFS/SMB server that can host your own filesystem. I've done a couple of small samples with it - and the docs are terrible, but it more or less worked.
  2. Dokan, a userspace file driver with .NET bindings. I haven't used this one, but it looks promising. It has both .NET and Ruby bindings, so you should be able to get a POC up pretty quickly.
  3. Callback File System - yet another userspace file system. Again, I have no experience with this one.
  4. A Linux box with SAMBA and FUSE that shares the drive out to the Windows box.



回答2:


This won't answer your question in any meaningful way, but maybe it will get you pointed in the right direction. Look into serving the "file(s)" via WebDAV--SharePoint uses this and its files can be accessed exactly as you want, as a file share where the transport mechanism is HTTP. Unfortunately I can't give any more detailed info, as I've only worked on the client end of WebDAV and not the server side of things.




回答3:


I think serving up files from WebDAV might be what you're looking for.



来源:https://stackoverflow.com/questions/24408/database-query-representation-impersonating-file-on-windows-share

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!