If you're making an HTTP Post on WP7/WP8 and you get back an annoying NotSupportedException, then one thing i might be is that you forgot to Flush/Close/Dispose the Request stream.
i.e. make sure that you do the `using` part of:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
client.BeginGetRequestStream(state => | |
{ | |
try | |
{ | |
using (var dataStream = client.EndGetRequestStream(state)) | |
{ | |
dataStream.Write(postData, 0, postData.Length); | |
dataStream.Flush(); | |
} | |
client.BeginGetResponse(respState => | |
{ | |
try | |
{ | |
var response = client.EndGetResponse(respState); | |
// ... |
No comments:
Post a Comment