3

I created a WCF Rest service and I am reading content sent by multipart/form data. However I get the contentdisposition and extra information. Is there a way to parse it like using HttpContext. I dont want dependency with asp...

If possible no use of external libraries, thirdparty dlls, etc... Unless its simple and consistent code I can implement.

Devela
  • 564
  • 1
  • 6
  • 25

1 Answers1

3

In case of parsing multipart data you should use some library/class or do it manually. There is no built-in functionality. Parser is pretty easy. But you can reuse some parser classes already written.

  1. Try following project (MIT license) and file HttpMultipartParser.cs from this project:

    https://bitbucket.org/lorenzopolidori/http-form-parser/src

  2. http://multipartparser.codeplex.com/

    http://multipartparser.codeplex.com/SourceControl/changeset/view/69709#458003

Regfor
  • 8,515
  • 1
  • 38
  • 51