Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have to develop an application (in C#) that has to work with files. The application consists of two versions: a web version and a windows version. Therefore, the files must be stored on a place where both versions can access the files.

In both versions, the files can be edited and new files can be created.

I've been thinking about the following options to store files:

  • IIS using WebDav
  • Sharepoint
  • Using a share and make this share a virtual directory in IIS.

I don't have experience with one of these options and these were the options that came to my mind.

What is in your eyes the best way to store the files?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

Unless you have other requirements I'd keep it simple, use a share. You might want to think about who has access to the files, perhaps you don't want other people randomly removing them if they are controlled by your code, but you can do this with ACLs quite easily.

WebDav and Sharepoint would both work but I think both add a little more complexity.

share|improve this answer
    
The only requirements (at this point..) are that a file can be edited, removed and new files can be created. –  Martijn Apr 14 '11 at 10:12
    
I agree. Keep it simple unless there is a compelling reason to add the complexity. –  Walter Apr 14 '11 at 15:17
    
We use shares. It works well for our needs. –  Nikki9696 Apr 14 '11 at 16:07

How about an XML file? The program can access the xml file normally. However for the web application, you'd need to write a servlet which retrieves the data on behalf of the web user. Perhaps it requires more time to do it this way, but once you have a servlet which does this, you can essentially use the same pattern for any data written in files on the server.

share|improve this answer
    
I don't see how I can store files in an xml file? The application can store all kind of files (word, excel, notepad, etc.). –  Martijn Apr 14 '11 at 8:26
    
Well an xml for storing nondescript data, though yes you could save any type of file without doing anything special. Put it in a folder which your application accesses. The same folder is used to access files which are retrieved by a servlet which passes these files to the web user. I would strongly encourage you to do this over IIS as with IIS you have no control over what files are accessible and what are private. –  Neil Apr 14 '11 at 8:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.