开发者

update gmail contacts C# exception

开发者 https://www.devze.com 2023-01-15 03:52 出处:网络
I am trying to update gmail contacts info Contact updatedContact = contact.Contact; updatedContact.Content = \"Contact information for \" + contact.Contact开发者_C百科.Name.FullName;

I am trying to update gmail contacts info

Contact updatedContact = contact.Contact;
updatedContact.Content = "Contact information for " + contact.Contact开发者_C百科.Name.FullName;
Uri feedUri = new Uri(ContactsQuery.CreateContactsUri("default"));
RequestSettings rs2 = new RequestSettings("CreateContacts", username, password);
ContactsRequest cr = new ContactsRequest(rs2);
Contact createdContact = cr.Update(updatedContact);

but I got that exception

"execution of request failed http://www.google.com/m8/feeds/contacts/"mail"/full/..."

any ideas?


It's an issue with your machine running the code, it may work on other machines.

If you are behind a proxy, here is an article on how to setup properly with proxies:

http://code.google.com/apis/gdata/articles/proxy_setup.html


I find the reason of the exception

there is no problems appears when names are updated like that

contact.Name.FullName = value;

but when update phone numbers like that the above exception appears

contact.Phonenumbers.Add(new Google.GData.Extensions.PhoneNumber(value));

it appears that gmail return the same exception regardless of what error had happened, how can I understand that from just "execution of request failed", that is quite annoying.

I hope they add some details, though I do not know what is wrong in updating phone numbers like that.

0

精彩评论

暂无评论...
验证码 换一张
取 消