There is a pending asynchronous operation, and only one asynchronous operation can be pending concurrently There is a pending asynchronous operation, and only one asynchronous operation can be pending concurrently multithreading multithreading

There is a pending asynchronous operation, and only one asynchronous operation can be pending concurrently


Needed to add the following line of code.

Request.Content.LoadIntoBufferAsync().Wait();

This was added just before the line that was erroring out.

So it now looks like this.

            var provider = new MultipartFormDataStreamProvider(root);            Request.Content.LoadIntoBufferAsync().Wait();            //// Read the form data and return an async task.             await Request.Content.ReadAsMultipartAsync(provider);