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,


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.

Mike Powell

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

Joel Lucsy
+2  A: 

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.
Mark Brackett
WebDAV is a file system management protocol, just like SMB is. It can be used to manage an existing directory as you say, but it can also be used to manage other things like an Exchange store or a SharePoint document library. This to me sounds exactly like what the OP was asking about.
Mike Powell
Nope - the OP wants an arbitrary resource served over HTTP (which, perchance, could be a WebDAV accessible resource like Exchange) accessible through normal Windows file sharing (SMB/CIFS). So, a SMB gateway to Exchange via WebDav for instance.
Mark Brackett