Hi,

As per the documentation:
http://code.google.com/apis/calendar/data/2.0/developers_guide_protocol.html#AddAcl
"""
If there is already a rule in the access control list with a scope
whose type and value match that in the request, and whose role is
anything other than none, then the POST operation fails with error
code 409 Conflict.
"""
http://code.google.com/apis/calendar/data/2.0/developers_guide_dotnet.html#AddAcl
"""
Note that if an attempt is made to add an entry with a scope whose
type and value match another entry already in the access control list,
the operation will fail with error code 409 (Conflict).
"""

I believe there is already a role defined for that user in this access
control list, maybe you should be doing an Update() instead of
Insert() ?

On Fri, Apr 15, 2011 at 8:51 PM, Swathi <[email protected]> wrote:
> Hi,
>
> I got a 409 conflict error while trying to share the event. Explanation for
> this error is:- Specified version number doesn't match resource's latest
> version number. But I am not putting the version number anywhere, then where
> is this coming from? Below is my code...
>
> static AclEntry AddAccessControl(CalendarService service, string aclFeedUri,
> string userEmail, AclRole role)
> {
> AclEntry entry = new AclEntry();
> entry.Scope =
> new AclScope();
> entry.Scope.Type =
> AclScope.SCOPE_USER;
> entry.Scope.Value = userEmail;
> entry.Role = role;
> Uri aclUri = new
> Uri("http://www.google.com/calendar/feeds/[email protected]/acl/full";);
> AclEntry insertedEntry = service.Insert(aclUri, entry);
> Console.WriteLine("Added user {0}", insertedEntry.Scope.Value);
> return insertedEntry;
> }
>
> // Calling the function from another function to get executed.
> AclEntry aclEntry = AddAccessControl(service,
> "https://www.google.com/calendar/feeds/[email protected]/acl/full";,
> "[email protected]", AclRole.ACL_CALENDAR_OWNER);
> // Error I am getting is:
> Unhandled Exception: Google.GData.Client.GDataRequestException: Execution of
> request failed:
> http://www.google.com/calendar/feeds/[email protected]/acl
> /full?gsessionid=D3C7iOGx8O9E0MTTN9wxRw ---> System.Net.WebException: The
> remote
>  server returned an error: (409) Conflict.
>    at System.Net.HttpWebRequest.GetResponse()
>    at Google.GData.Client.GDataRequest.Execute()
>    --- End of inner exception stack trace ---
>    at Google.GData.Client.GDataRequest.Execute()
>    at Google.GData.Client.GDataGAuthRequest.Execute(Int32 retryCounter)
>    at Google.GData.Client.GDataGAuthRequest.Execute()
>    at Google.GData.Client.Service.EntrySend(Uri feedUri, AtomBase baseEntry,
> GDa
> taRequestType type, AsyncSendData data)
>    at Google.GData.Client.Service.Insert(Uri feedUri, AtomEntry newEntry,
> AsyncS
> endData data)
>    at Google.GData.Client.Service.Insert[TEntry](Uri feedUri, TEntry entry)
>    at Project1.CalendarDemo.AddAccessControl(CalendarService service, String
> acl
> FeedUri, String userEmail, AclRole role)
>
> Please suggest
>
> --
> 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://code.google.com/apis/calendar/community/forum.html
>



-- 
Johan Euphrosine (proppy)
Developer Programs Engineer
Google Developer Relations

-- 
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://code.google.com/apis/calendar/community/forum.html

Reply via email to