WebRequest BeginGetResponse/EndGetResponse throws exception when using Task.FromAsync
I try to asyncify the POST operation to a REST web service using the WebRequest. So from what I know already, I need to use the Task.Factory.FromAsync<T>(BeginXyz, EndXyz, null) , seems like its working for the GetRequestStream pair methods, since I get no exception and the byte[] is filled with values. Stream requestStream = await Task.Factory.FromAsync<Stream>( request.BeginGetRequestStream, request.EndGetRequestStream, null); byte[] postBytes = Encoding.UTF8.GetBytes(requestData); await requestStream.WriteAsync(postBytes, 0, postBytes.Length); Fine, the above code is working, and the next