Hi,
Below is the code I am using to share an event created.
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
req
uest 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)
--
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