I have created a service which accept 2 things :
1) A body parameter called \"type\".
2) A csv file to be uploaded.
i am reading this two things in s
The code you have above does not create a proper multipart body.
You can't simply write the file into the stream, each part requires a preamble boundary marker with per-part headers, etc.
See Upload files with HTTPWebrequest (multipart/form-data)
Some informations about your multiple contentTypes problem here : http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7.2
multipart/form-data is the only way to send multiples data types over http protocol.