ews-managed-api
ews-managed-api copied to clipboard
"A referenced period is missing." Timezone related error.
While working on a syncing software for one of my clients. One of the users repeatedly (but! not always) throws exception of: "A referenced period is missing., A referenced period is missing. " When trying to save / update an appointment.
As mentioned in #74 and a quick search in google it's looks like a time zone related error but without any explanation.
From a look at the user office client (outlook 2010), the user regional settings on the desktop and the regional settings on the server everything looks good. keep in mind other users works fine.
Any insights?
Stack trace provided:
A referenced period is missing., A referenced period is missing. at Microsoft.Exchange.WebServices.Data.ServiceResponse.InternalThrowIfNecessary() at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest
1.Execute() at Microsoft.Exchange.WebServices.Data.ExchangeService.InternalCreateItems(IEnumerable
1 items, FolderId parentFolderId, Nullable1 messageDisposition, Nullable
1 sendInvitationsMode, ServiceErrorHandling errorHandling) at Microsoft.Exchange.WebServices.Data.ExchangeService.CreateItem(Item item, FolderId parentFolderId, Nullable1 messageDisposition, Nullable
1 sendInvitationsMode) at Microsoft.Exchange.WebServices.Data.Item.InternalCreate(FolderId parentFolderId, Nullable1 messageDisposition, Nullable
1 sendInvitationsMode) at Microsoft.Exchange.WebServices.Data.Appointment.Save(WellKnownFolderName destinationFolderName, SendInvitationsMode sendInvitationsMode) at LuzerImporter.Classes.Exchange.CreateOrModify(LuzerEvent lEvent, Appointment appItem, Int32 nRetry)The request is not supported
Can you post your timezone request header? Sounds like the timezone definitions has an incomplete set of transition periods.
Hi, @davster i'm using the EWS API, how can i find the timezone header? (which variable in the ews service)
Hi @oranasraf, did you solve this problem?
@LitvinovAndrey Unfortunately no. Do you have any insights?
@oranasraf I change the EWS schema version to Exchange2007_SP1 and now it works fine https://blogs.msdn.microsoft.com/webdav_101/2017/09/16/when-a-certain-time-zone-does-not-work-with-the-ews-managed-api/
@LitvinovAndrey Did you have the same error as mine? If ill change the schema to 2007 i will miss some of my features i'm using.
@LitvinovAndrey Did you have the same error as mine? If ill change the schema to 2007 i will miss some of my features i'm using.
If it's still relevant, you do NOT have to use 2007 version, you just need to find out the TimeZone of your exchange server.
Like that in my case:
_exchange = new ExchangeService(exchangeVersion, TimeZoneInfo.Utc);
Initialization of exchange service with version and TimeZoneInfo parameter. And it works fine.