Reading content to the memory from the multi-part file upload
问题 I have a problem reading uploaded XML file to the string instead of file. My problem is that when I try to access the stream ( var stream = part.ContentReadStream ) then it's closed. I have feeling that it is accessing closed file stream. Am I using MultipartFormDataStreamProvider incorrectly? File size is only few kilobytes, so that should not be a problem. [WebInvoke(Method = "POST", UriTemplate = "{importFile}")] public HttpResponseMessage Upload(string importFile, HttpRequestMessage