manu5987
manu5987

Reputation: 69

Insert file to Google Drive from .NET WCF service

I have created a sample application to insert documents into Google drive in .NET. I have used WCF service for this purpose. To the service method I pass: an access token, a refresh token, and an expiry time.

I create the authenticator and drive service with the Google drive .NET SDK in the service using the paramenters passed to it. During insertion it gives the error

You must provide a request body if you set ContentLength>0 or SendChunked==true. Do this by calling [Begin]GetRequestStream before [Begin]GetResponse.

What am I doing wrong?

Upvotes: 0

Views: 868

Answers (1)

Claudio Cherubino
Claudio Cherubino

Reputation: 15004

This looks like a known issue with the library that has been recently fixed: http://code.google.com/p/google-api-dotnet-client/issues/detail?id=181

If you don't want to update the whole library, just make sure you apply the patch at http://code.google.com/p/google-api-dotnet-client/source/detail?r=fe2d32e0713ae1c6138af72049377b145d4fa6cf

If you can wait, a newer version of the library will be released soon and will contain that fix.

Upvotes: 1

Related Questions