Click here to Skip to main content
15,171,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi experts,
i want to import contact in gmail i am using
using Google.GData.Contacts;
using Google.GData.Client;
using Google.GData.Extensions;
using Google.Contacts;

API. but it give exception

my code is
public static DataSet GetGmailContacts(string App_Name, string Uname, string UPassword)

        DataSet ds = new DataSet();

        DataTable dt = new DataTable();

        DataColumn C2 = new DataColumn();

        C2.DataType = Type.GetType("System.String");

        C2.ColumnName = "EmailID";


        RequestSettings rs = new RequestSettings(App_Name, Uname, UPassword);

        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();





        return ds;


And exception is:
<br />
Execution of request returned unexpected result:</contact>
Updated 3-Jul-14 22:23pm

I guess you need to update the DLL.
Refer comment - ASP.NET: Import Gmail Contacts[^].
You need to update Google DLL. Only https:// (SSL) works from 01/march/2014
Yogesh Kumar Tyagi 4-Jul-14 5:08am
Thanks sir
Most welcome. :)
Before posting any question google it if you unable found result then post it.

Your ans is :[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900