Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Error getting response stream (ReadDone1): ReceiveFailure

dannyZangeifdannyZangeif USMember
edited June 2016 in Xamarin.Forms

Cant figure out what the deal is!

This code has been working and left untouched. Not It keeps breaking with a: "Error getting response stream (ReadDone1): ReceiveFailure"...

As an FYI this code is happening on IOS.

`byte[] dataBytes = Encoding.ASCII.GetBytes(data);

            HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(getUploadUrl.uploadUrl);
            webRequest.Method = "POST";
            webRequest.Headers.Add("Authorization", uploadAuthorizationToken);
            webRequest.Headers.Add("X-Bz-File-Name", userName + ".json");
            webRequest.Headers.Add("X-Bz-Content-Sha1", sha1);
            webRequest.ContentType = "b2/x-auto";

            //byte[] bytes = File.ReadAllBytes(data);

            using (var stream = webRequest.GetRequestStream())
                stream.Write(dataBytes, 0, dataBytes.Length);

           WebResponse response = (HttpWebResponse)webRequest.GetResponse();`
Sign In or Register to comment.