try
{
results = this.exchangeService.GetUserAvailability(attendees, new TimeWindow(startTime, endTime), AvailabilityData.FreeBusy);
}
catch (Exception ex)
{
string attendeesString = string.Empty;
foreach (AttendeeInfo item in attendees)
{
attendeesString += item.SmtpAddress + "; ";
}
LogData logData = MethodLogUtilityForExchange.GetLogDataGetAttendeesAvailabilityDebug(attendeesString, startTime, endTime, ex);
LogUtility.LogException(logData, "EWS GetAttendeesAvailability Exception", ex, LogCategory.MethodInformation);
throw;
}
Exception stack trace :
ExceptionSystem.ArgumentException: An item with the same key has already been added.
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Microsoft.Exchange.WebServices.Data.ExchangeServiceBase.SaveHttpResponseHeaders(WebHeaderCollection headers)
at Microsoft.Exchange.WebServices.Data.SimpleServiceRequestBase.ReadResponse(HttpWebResponse response)
at Microsoft.Exchange.WebServices.Data.GetUserAvailabilityRequest.Execute()
at Microsoft.Exchange.WebServices.Data.ExchangeService.GetUserAvailability(IEnumerable`1 attendees, TimeWindow timeWindow, AvailabilityData requestedData)
at Intel.Exchange.WebServices.Extension.ExchangeServiceManager.GetAttendeesAvailability(List`1 attendees, DateTime startTime, DateTime endTime)
Can you help in understanding the issue ? we are not handling any Dictionary explicitly here. but still we see the Dictionary key error. Not sure What would have gone wrong.