asifshaon / google-api-dotnet-client

Automatically exported from code.google.com/p/google-api-dotnet-client
Apache License 2.0
0 stars 0 forks source link

An error has occured: You must provide a request body if you set ContentLength>0 or SendChunked==t rue. Do this by calling [Begin]GetRequestStream before [Begin]GetResponse. #181

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run the .net project under .net 4 runtime. This error appears

Original issue reported on code.google.com by Mister.k...@gmail.com on 7 Jan 2012 at 12:53

GoogleCodeExporter commented 9 years ago
ok, seems as though .net 4 makes the requests call in a different sequence and 
doesn't wait for BeginGetRequestStream to complete before GetResponse. I added 
a small lock to the thread, preventing the call to GetResponse before 
GetRequestStream is complete. Not an optimal solution, though quick and dirty. 
Would like to see a real update from google's team though :)

Updated Request.cs in GoogleApis for working with .net 4. View attachment. 

Original comment by Mister.k...@gmail.com on 7 Jan 2012 at 8:25

Attachments:

GoogleCodeExporter commented 9 years ago
See my solution and Request.cs in Issue 130:

http://code.google.com/p/google-api-dotnet-client/issues/detail?id=130

Original comment by eyeratio...@gmail.com on 19 Jan 2012 at 1:51

GoogleCodeExporter commented 9 years ago

Original comment by asky...@google.com on 25 Apr 2012 at 6:31

GoogleCodeExporter commented 9 years ago

Original comment by asky...@google.com on 25 Apr 2012 at 9:30

GoogleCodeExporter commented 9 years ago
http://codereview.appspot.com/6055049/
http://code.google.com/p/google-api-dotnet-client/source/detail?r=fe2d32e0713ae1
c6138af72049377b145d4fa6cf

Original comment by asky...@google.com on 25 Apr 2012 at 9:31