Thanks for the reply Austin,

I am storing the Edit URL locally, and I think your suggestion to get
it from the server on update is a great idea I will implement soon.

Right now however, if I indeed have an old EditURI the response string
I get back from the request is the latest version of the event. What I
am doing currently is getting the latest EditURL from that response,
and then sending out my request again.

Obviously this behaviour is inelegant and inefficient and I think your
suggestion will help me with that.

However, the inconsistent 401 errors I'm getting is unrelated to this
problem, i.e. to do with authentication (which I think has more to do
with the issue pointed out in the URL I posted, but here it is again
for posterity: 
http://www.thepoorhouse.org.uk/avoiding_the_401_authorization_required_error_with_google_calendar_api
). So if this is the problem, does anyone have any elegant solution
using the current version of the C# gdata libraries (1.2.2.0)?



Trystan


On Oct 2, 11:18 am, "Austin (Google)" <[EMAIL PROTECTED]> wrote:
> Hi,
> I noticed that you are retrieving the edit URL by passing into a property
> object, that made me think that perhaps you are storing the edit URL locally
> rather than retrieving it fresh from the server.  The edit URL must be
> retrieving live because it can be different each time.  I am not sure if
> this is what causing your problem, please try it and let me know.  Thanks!
>
> Austin
>
> On Tue, Sep 30, 2008 at 4:20 PM, Trystan Hill <[EMAIL PROTECTED]>wrote:
>
>
>
> > Hi,
>
> > I'm having a problem that looks like a few others have experienced,
> > being that ~1/2 of all requests going to the calendar api fail with:
>
> > <HTML>
> > <HEAD>
> > <TITLE>Authorization required</TITLE>
> > </HEAD>
> > <BODY BGCOLOR="#FFFFFF" TEXT="#000000">
> > <H1>Authorization required</H1>
> > <H2>Error 401</H2>
> > </BODY>
> > </HTML>
>
> > Following is the code used (note I'm having problems with all event
> > modificaton actions, but the deletion code is easier to read):
>
> > Deletion:
>
> >        private void DeleteEvent(SPItemEventProperties properties,
> > googleConfig config)
> >        {
> >            Service calService = new Service("cl", "exampleCo-
> > exampleApp-1");
> >            calService.setUserCredentials(config.username,
> > config.password);
>
> >            EventEntry entry = new EventEntry();
> >            entry.SelfUri = (string)properties.ListItem["SelfURI"];
> >            entry.EditUri = (string)properties.ListItem["EditURI"];
>
> >            try
> >            {
> >                calService.Delete(entry);
> >            }
> >            catch (GDataRequestException excp)
> >            {
> >                config.elog.WriteEntry("Error with account " +
> > config.username + ": " + excp.Message + "\r\n" + excp.ResponseString);
> >            }
> >        }
>
> > Now I read here:
> >http://www.thepoorhouse.org.uk/avoiding_the_401_authorization_require...
> > that because of your server farms you send back a redirection http
> > response, so what I was wondering is if this is the problem that I'm
> > facing and if there is any elegant way of handling this redirection
> > with the current C# api library.
>
> > Thanks
>
> > Trystan

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Calendar Data API" group.
To post to this group, send email to 
[email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to