Hi Camel,

Are you getting the error only with this particular image? Please try
a smaller one.

You can also try the following:

System.IO.FileStream fs = new System.IO.FileStream("C:\\foto.jpg",
System.IO.FileMode.Open);
contactsService.Update(entry.PhotoEditUri, fs, "image/jpg", "Contact
Photo");

Something important, the latest library was updated to use Contacts V2
and the EditPhotoUri is not longer used.

-Julian


On Mar 2, 3:20 am, Camel <[email protected]> wrote:
> After some research, I've tried the following code:
>
>     System.Drawing.Bitmap Image = new Bitmap( @"C:\test.jpg" );
>     System.IO.MemoryStream Memory = new MemoryStream();
>     Image.Save( Memory, System.Drawing.Imaging.ImageFormat.Jpeg );
>
>     Service.Update
>         (
>             Contact.PhotoEditUri,
>             Memory,
>             "image/jpeg",
>             null
>         );
>
> The Service is using ClientLogin authentication. Before this code
> runs, I have successfully retrieved the contact.
>
> After this code runs, however, I get a GDataRequestException. The
> error message returned is, "A temporary internal problem has occurred.
> Try again later". The error message in the InnerException contains the
> following, "The remote server returned an error: (500) Internal Server
> Error."
>
> After yet more research, I found hints that the error codes from the
> Google service may not be all that descriptive - and may simply return
> error 500.
>
> So maybe the problem is with my code? Does anybody have sample code to
> demonstrate how this should be done?
>
> Thanks,
>
> Camel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Contacts API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-contacts-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to