views:

785

answers:

2

I don't want to reinvent the whell, I must display remote files and folders (like SQL Management studio does), should I develop my own interface and logic or there is an alternative? I need multiple selection.

I'm using VS2008 .Net Framework 3.5 SP1

Thanks

EDIT:

I built a multi-ambient music server that is running in the network and i must provide the ability to select which music files or folders should be played. The files resides on the server and are not available to the clients. The clients comunicates to the server trought a WCF service i built.

A: 

When you say remote, exactly what do you mean? Do you mean on another server in your intranet, or out on the wide web?

If you just need to view files on another machine in your intranet, the built in file chooser in .net will work. All you need to do is hand it a network address (like: \somemachine\somefilepath).

If you mean more remote than that, then FTP might be an option. You can build yourself basic FTP functionality in your C# application in very little time. Google "C# FTP" and you'll find lots of examples.

A third option would be a simple WCF service that returns a list of file names. But you said you needed "multiple select", so I am assuming you want to do more than just "read" the files, in which case you need to transfer them over the wire, in which case I recommend the FTP route.

Chris Holmes
I built a multi-ambient music server that is running in the network and i must provide the ability to select which music files or folders should be played. The files resides on the server and are not available to the clients. The clients comunicates to the server trought a WCF service i built.
Marco Bettiolo
Then what you want to do Marco is my last suggestion listed: get the file names on the server and return them through your WCF service. I have done this too for a streaming server I wrote. The client can then choose the filename which you can send back to the server via WCF.
Chris Holmes
A: 

Addition to the above - what do you mean by "files", and how would you expect to display them? In a custom application, or by using Windows Explorer?


WCF may not be the most appropriate way to do this, as was said above. There are already file transfer protocols in the world, and if you don't want to reinvent the wheel, then you shouldn't create a file transfer protocol based on WCF. You should use FTP, HTTP or WebDAV.

Otherwise, you should look at those protocols (especially WebDAV) for inspiration on what your service will need to do. It will need to expose a concept of files and folders, and to have a way to get file information and get files.

Just like "the wheel" already does.

John Saunders
I would like to display them in a custom application.
Marco Bettiolo