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_required_error_with_google_calendar_api
> 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
-~----------~----~----~----~------~----~------~--~---