导入Gmail contactList的一些问题 [英] Some problems to import Gmail contactList
本文介绍了导入Gmail contactList的一些问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试导入Gmail通讯录。我有这个区块代码:
I try to import Gmail Contacts. I have this block code:
public void GetGmailContacts(string p_name, string login, string password)
{
RequestSettings rs = new RequestSettings(p_name, login, password);
rs.AutoPaging = true;
ContactsRequest cr = new ContactsRequest(rs);
Feed<Contact> f = cr.GetContacts();
foreach (Contact t in f.Entries)
{
foreach (EMail email in t.Emails)
{
DataRow dr1 = dt.NewRow();
dr1["emailid"] = email.Address.ToString();
dt.Rows.Add(dr1);
}
}
}
但在这一排:
But in this row:
foreach (Contact t in f.Entries)
我得到这个例外:
执行请求返回意外结果:http://www.google。 com / m8 / feeds / contacts / default / fullMovedPermanently
任何想法为什么我会得到这个例外以及如何解决它?
感谢您提前。
I get this exception:
Execution of request returned unexpected result: http://www.google.com/m8/feeds/contacts/default/fullMovedPermanently
Any idea why do I get this exception and how to solve it?
Thank you for advance.
推荐答案
从您的nuget安装包Google.GData.Contacts pm您的问题将得到解决
Install-Package Google.GData.Contacts from your nuget pm your issue will be resolved
@QoSi QuReshi
仍无法正常工作...... !!!
@QoSi QuReshi
still not working...!!!
这篇关于导入Gmail contactList的一些问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文