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 need to create a web service using the .NET platform for accepting file uploads. What are the options available for doing this in C#? What is the best approach to use? Can please you provide me with blogs/code samples/references for further reading?

share|improve this question

closed as not a real question by gnat, Yusubov, Glenn Nelson, World Engineer, Mark Booth Feb 28 '13 at 18:09

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

3  
What kind of files? It makes a difference if we're talking binary or something like XML. –  MattDavey Feb 28 '13 at 16:13
    
both binary files and xml files. both are treated the same: as binary –  amaters Mar 1 '13 at 7:57

1 Answer 1

up vote 4 down vote accepted

The simplest approach would be to use WebDav there's even a C# library that you can embed in an application or for a server (can't find the link right now).

If you specifically have to use a WebService, it's as simple as creating a WCF Contract that accepts a Stream. Here's a great example on CodeProject. Enjoy.

share|improve this answer

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