2 messages in com.googlegroups.google-calendar-help-dataapiRe: Inserts event only alternately
FromSent OnAttachments
gcal programmer18 Jan 2007 17:38 
Ryan Boyd (Google)23 Jan 2007 15:57 
Subject:Re: Inserts event only alternately
From:Ryan Boyd (Google) (api.@google.com)
Date:01/23/2007 03:57:58 PM
List:com.googlegroups.google-calendar-help-dataapi

Hello gcal programmer,

I don't know the exact cause of the error you're experiencing -- I don't believe any others have reported such a propblem. Frank has written some error handling notes and placed them online at http://code.google.com/p/google-gdata/wiki/ErrorHandling

These are geared towards C# users, but they should be translatable to VB.NET

If you let the error reach the top level, I know that VS Express (based upon 2005) has a nice little dialog box for further exploring the error. The other thing I would suggest is putting breakpoints in the debugger before you do your insert and make sure everything looks similiar on the even and odd number of inserts.

If these methods fail to find the reason, feel free to send me the failing code (excluding the passWord value :) and I will take a look at it.

As for authenticating a web application -- this is fine as long as the userName and passWord are hard-coded. We highly discourage username/password (ClientLogin) authentication for web applications which are logging in as a third-party (ie, you're requesting the user's credentials in your web app). In these situations, you should be using the AuthSub method of authentication. More details about how to do this with the .NET library (written in C#) are available at:http://code.google.com/p/google-gdata/wiki/AuthSubSupport

Cheers,

-Ryan

On Jan 18, 5:38 pm, "gcal programmer" <suni@gmail.com> wrote:

Hiii

I am using visual studio 2005 and coding in vb.net for a web application...I am using the google calendar api to insert events into the google calendar...This is a part of the code that im using..

Dim service As New CalendarService("Insure Socket") service.setUserCredentials(userName, passWord) query.Uri = New Uri(calendarURI) Dim calFeed As EventFeed = service.Query(query)

When i add an event for the first time...everything works fine....then when i again go and add an event i get an error at the line "Dim calFeed As EventFeed = service.Query(query)"...The third time i add an event it works..but th efourth time time doesnt work....so it works only alternately....The error that i get is as follows..Google.GData.Client.GDataRequestException {"Execution of authentication request failed"}

What could the problem be? Is this the right way to authenticate for a web application? Thanks in advance...