1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2015
    Rep Power

    Problem With Fetching Contact List From Gmail Account

    Hello Friends,

    I am working on module in asp.net, my task is to get all contact list from Gmail Account,
    I have done coding part but it is not working it is showing error
    "Execution of authentication request returned unexpected result: 404"
    i also have attach my coding file...
    please help me in same

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using Google.GData.Contacts;
    using Google.GData.Extensions;
    using Google.GData.Client;
    using Google.Contacts;
    using System.Data.SqlClient;
    using System.Data;
    namespace GetDetailsOfGmail
        public partial class WebForm1 : System.Web.UI.Page
            protected void Page_Load(object sender, EventArgs e)
            protected void Button1_Click(object sender, EventArgs e)
                DataSet ds = new DataSet();
                RequestSettings rs = new RequestSettings("myApp", txtUserName.Text,       txtPassword.Text);
                rs.AutoPaging = true;
                ContactsRequest cr = new ContactsRequest(rs);
                Feed<Contact> f = cr.GetContacts();
                foreach (Contact contact in f.Entries)
                    foreach (EMail email in contact.Emails)
                        DataRow row = ds.Tables[0].NewRow();
                        row["EmailId"] = email.Address.ToString();
                GridView1.DataSource = ds.Tables[0];
                lblStatus.Text = "Total Contacts For" + txtUserName.Text + " : " + ds.Tables[0].Rows.Count.ToString();
    Thanks in advance
  2. #2
  3. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    May 2006
    Rep Power
    I have never tried this before, but below discussion thread may help in fixing your issue.

    c# - Google.GData.Client.GDataRequestException - Authentication suddenly fails in old code - Stack Overflow
    Webhosting.uk.com - WHUK
    Domain ID Protection | Cloud Backup Solutions by WHUK | Managed Dedicated Hosting Services
    81% OFF .Store TLD | 70% OFF .shop TLD | 40% OFF .Blog TLD | 20% OFF .Cloud TLD
    New TLDs Up for Grabs!

IMN logo majestic logo threadwatch logo seochat tools logo