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
C#
using Google.GData.Contacts;
using Google.GData.Client;
using Google.GData.Extensions;
using Google.Contacts;

API. but it give exception

my code is
C#
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";

        dt.Columns.Add(C2);



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

                dt.Rows.Add(dr1);

            }

        }

        ds.Tables.Add(dt);

        return ds;

    } 

And exception is:
<br />
Execution of request returned unexpected result: http://www.google.com/m8/feeds/contacts/default/fullMovedPermanently</contact>
Posted
Updated 3-Jul-14 22:23pm
v2

I guess you need to update the DLL.
Refer comment - ASP.NET: Import Gmail Contacts[^].
Quote:
You need to update Google DLL. Only https:// (SSL) works from 01/march/2014
Comments
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 : https://code.google.com/p/google-gdata/issues/detail?id=507[^]
   

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