c# - Webclient UploadData returns error 417 even after putting expect100Continue to false -
Hi guys are trying to upload a tweet from my application and when I do a webclick upload it gives a webexctions "remote server returned an error: (417) expected failure." Looking around the net After, I think people expect that it will do false work to do 100 jobs, seeing my code I already had the snippet in my code. Does anyone else know why this is not working?
This is my code.
Public Bull Postatet (string tweet) {string aUrl = "http://twitter.com/ conditions / update.xml"; Client.Credentials = New network credentials (_username, _password); System.Net.ServicePointManager.Expect100Continue = false; Byte [] tweetBytes = System.Text.Encoding.UTF8.GetBytes ("status =" + Tweet); Client.UploadData (aUrl, tweetBytes); Back true; }
Hope this is helpful, and thanks in advance
< P> Try to create webcallint instanse after you believe Expect100Continue is wrong.