Excution of request failed:http://www.google.com/m8/feeds/contacts/default/full

1,696 views
Skip to first unread message

yong

unread,
Jun 13, 2008, 3:41:33 AM6/13/08
to Google Data Protocol
Hello.
This is liu,I come from China,My English is not good,recently,I make
up an VB.Net program,an Application program,I need to use Google Data
API to get some message from Gmail.
So I search some information from internet,and program according the
example:
The Source is:

Dim service As New ContactsService("Test")
service.setUserCredentials("yli...@gmail.com", "liuy@2008")

Dim query As ContactsQuery
query = New
ContactsQuery(ContactsQuery.CreateContactsUri("default"))

Dim feed As ContactsFeed
feed = service.Query(query)

For Each entry As ContactEntry In feed.Entries
Console.WriteLine(entry.Title.Text)
For Each email As EMail In entry.Emails
Console.WriteLine("\t" + email.Address)
Next
Next

but run the application,then the exception happend:"Excution of
request failed:http://www.google.com/m8/feeds/contacts/default/full"

So how can I do?
Thank,please tell me how to fix it,the better have sample.

Frank Mantek

unread,
Jun 13, 2008, 5:59:27 AM6/13/08
to google-he...@googlegroups.com
Can you catch the exeption thrown and look at the ResponseString
property of that exception and let us know what's in there?

Regards

Frank Mantek
Google

yong liu

unread,
Jun 13, 2008, 7:07:00 AM6/13/08
to google-he...@googlegroups.com
The exception message is :
Thank you for your help.

Frank Mantek

unread,
Jun 13, 2008, 7:36:49 AM6/13/08
to google-he...@googlegroups.com
This is the same message that you reported before. But there is more detail in the ResponseString property. The code to extract that should look like this:

  try
            {
                 contactFeed.Insert(entry)
            }
            catch (GDataRequestException e)
            {
                Console.WriteLine("Operation failed ({0}): {1}", e.Message, e.ResponseString);
            }

Frank Mantek
Google

yong liu

unread,
Jun 13, 2008, 7:48:47 AM6/13/08
to google-he...@googlegroups.com
sorry,your mean is let me tell you the ReponseString?
the ResponseString is:
"<HTML>
<HEAD>
<TITLE>Authorization required</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Authorization required</H1>
<H2>Error 401</H2>
</BODY>
</HTML>"
 

Frank Mantek

unread,
Jun 13, 2008, 10:40:15 AM6/13/08
to google-he...@googlegroups.com
I took the code that you copied in the original mail, if i take the
user credentials and run this i get an "invalid credentials"
exception. I am not sure if they are wrong on purpose though :)

Your code looks fine in general, if you want me to took a deeper look,
feel free to send me test account information to my email directly.

Frank

yong liu

unread,
Jun 15, 2008, 10:40:01 PM6/15/08
to google-he...@googlegroups.com
Thank you for your help,there is 401 error.I think my username and password is OK.
I think the authentication have problem,I will give you my username and passord:
 
password:liuy12345
 
The better give the right code.Than you.

Frank Mantek

unread,
Jun 30, 2008, 6:01:20 AM6/30/08
to google-he...@googlegroups.com
First, you should NOT give out your username and password here in the openness of a group. You can send them to me for debugging purpose directly, assuming you trust me, but posting it poses a security risk to you.

Second, i tried those, and they are wrong (so in this case, you do not have a security problem :)). I can not use those to login to the UI.

Regards

Frank Mantek
Google
Reply all
Reply to author
Forward
0 new messages