views:

57

answers:

3

Here's the scenerio.

I have to access a web service on the local LAN to obtain a list of files which I then must retrieve from the machine running the web service. The question has arisen whether to use a mapped drive or just retrieve the files via HTTP from the web service (or web server if the service is self-hosting).

All machines are running Windows XP or later.

I am leaning towards the web server approach - because it has the fewest unknowns as far as having the necessary permissions to access the files.

So basically the question is which is the better approach - web server or network share?

+1  A: 

I would go the webservice route because it reduces the number of variables in the equation. Based on your current setup you already need a web service in order to get a list of files to download. At this point you know access to the web service isn't a problem so putting the files there removes a lot of unknowns.

If you put files onto another machine you run the risk of hitting at least the following problems that do not exist with the web service (since you already know you have access)

  • Permission Issues
  • Firewall issues
JaredPar
A: 

I would lean towards plain old HTTP. Doing it via the web service would probably involve marshalling the file as an array, for example, which makes it larger. A file share means needing to worry about permissions.

Dark Falcon
+1  A: 

I would think it depends on various factors you haven't mentioned: will lots of clients be trying to access these files at a given time? Will the app be distributed across multiple servers in the future? Might you need to implement a caching system in the future?

If the answer is no to all of these, then you should probably pick what's easiest.

Dave Nichol
I should add that if the answer is "yes" to those questions, you probably want to serve the files over HTTP.
Dave Nichol