Unfortunately this is one of a number of bizare design choices for the Silverlight WebClient, you can't access the Response easily having performed a POST. Its really odd since most POST operations have a useful response body.
However there are a number of things you can do. You could ditch the WebClient
and use WebRequest
/WebResponse
directly. You could inherit off the WebClient
and override GetWebResponse
so you can intercept it.
However a sneaky option if your string message is reasonably short is to add a custom HTTP header to the response.
The thread executing OpenWriteCompleted will block when the output stream is closed until a response is received. At that point you can access the ResponseHeaders
collection on the WebClient
object to retrieve the value of your custom header. (Why the Response stream hasn't been made available at the point escapes me!)