views:

119

answers:

1

In an application we are developing, I have access to a database table which gives me the path to some files that are available on a file server. This file server is accessible from the machine on which IIS is running. Is there a mechanism I can use to (on demand) copy a given file from the file server to the web server and make the file available for download by a given user?

+2  A: 

Yes, use the SMB protocol from a web-application to move the file over from a network mapped drive (from the file-server to the network server) and then serve it up to the client.

You could just serve straight from the file server.

Here is some more info.

Hassan Syed
Thanks for the reply. I need to do a copy, as the client do not want to expose the file server directly.
helgeg
You won't be exposing the file server, you will be exposing your web-server.
Hassan Syed
Ok, thanks for the clarification. I will read up on how to use the SMB protocol.
helgeg
You don't need to read up on the details of smb really, its a normal windows file share. Just map the file-server on the web-server as a local drive.
Hassan Syed