3

Several months ago we developed a web app to display the conference room schedules on monitors at our office. It has worked like a charm until a couple of weeks ago. Nothing has changed as far as permissions or code, but now we get the following error in our C# code:

ErrorMessage "Proxy web request failed. , inner exception: System.Web.Services.Protocols.SoapException: Periods have duplicate IDs.\r\n at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)\r\n at System.Web.Services.Protocols.SoapHttpClientProtocol.EndInvoke(IAsyncResult asyncResult)\r\n at Microsoft.Exchange.InfoWorker.Common.Availability.Proxy.Service.EndGetUserAvailability(IAsyncResult asyncResult)\r\n at Microsoft.Exchange.InfoWorker.Common.Availability.FreeBusyApplication.EndProxyWebRequest(ProxyWebRequest proxyWebRequest, QueryList queryList, IService service, IAsyncResult asyncResult)\r\n at Microsoft.Exchange.InfoWorker.Common.Availability.ProxyWebRequest.EndInvoke(IAsyncResult asyncResult)\r\n at Microsoft.Exchange.InfoWorker.Common.Availability.AsyncWebRequest.EndInvokeWithErrorHandling()" string

The error is displayed after the following line is executed:

var availability = service.GetUserAvailability(aInfo, tw, AvailabilityData.FreeBusy);

and before the following line is executed:

foreach (Microsoft.Exchange.WebServices.Data.AttendeeAvailability ava in availability.AttendeesAvailability)

The autodiscover script executed without error, so we have an active connection to the server. Not sure what "Periods have duplicate IDs." means from the error message above. Has anyone seen this before?

2 Answers 2

3

I was able to workaround the issue by specifying the ExchangeVersion.Exchange2007_SP1 protocol when creating the ExchangeService instance. E.g.:

ExchangeService exchangeService = new ExchangeService(ExchangeVersion.Exchange2007_SP1);

The user availability functionality stopped working for me somewhere in mid December 2014 for the Exchange2013 protocol. All AttendeeAvailability entities started being returned with the following error information:

ErrorCode == ServiceError.ErrorProxyRequestProcessingFailed
  && ErrorMessage.StartsWith("Proxy web request failed. , inner exception: System.Web.Services.Protocols.SoapException: Periods have duplicate IDs."

For whatever reason, the user availability functionality seems to work when reverting back to the Exchange2007_SP1 protocol.

1
  • THANK YOU!! I Have been beating my head against the wall with the exact same problem. Our web app worked for over a year then just stopped with the duplicate IDs error message. Changed the version on the service and poof like magic it worked.
    – user39850
    Feb 20, 2015 at 16:16
2

There is another way to address this issue - specify a different time zone when creating the EWS service connection:

// Create the UTC Time Zone we want to use for EWS
TimeZoneInfo ewsTimeZone = TimeZoneInfo.Utc;

// Create the binding
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013_SP1, ewsTimeZone);

This allows you to use more recent Exchange versions. I think UTC works because there is only one period in the time zone definition. Of course then you have to deal with all your interactions being in UTC, but that's not a big deal for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.