ews-managed-api icon indicating copy to clipboard operation
ews-managed-api copied to clipboard

"A referenced period is missing." Timezone related error.

Open oranasraf opened this issue 6 years ago • 7 comments

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.MultiResponseServiceRequest1.Execute() at Microsoft.Exchange.WebServices.Data.ExchangeService.InternalCreateItems(IEnumerable1 items, FolderId parentFolderId, Nullable1 messageDisposition, Nullable1 sendInvitationsMode, ServiceErrorHandling errorHandling) at Microsoft.Exchange.WebServices.Data.ExchangeService.CreateItem(Item item, FolderId parentFolderId, Nullable1 messageDisposition, Nullable1 sendInvitationsMode) at Microsoft.Exchange.WebServices.Data.Item.InternalCreate(FolderId parentFolderId, Nullable1 messageDisposition, Nullable1 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

oranasraf avatar Mar 04 '18 21:03 oranasraf

Can you post your timezone request header? Sounds like the timezone definitions has an incomplete set of transition periods.

davster avatar Mar 05 '18 20:03 davster

Hi, @davster i'm using the EWS API, how can i find the timezone header? (which variable in the ews service)

oranasraf avatar Mar 10 '18 16:03 oranasraf

Hi @oranasraf, did you solve this problem?

LitvinovAndrey avatar Oct 18 '18 22:10 LitvinovAndrey

@LitvinovAndrey Unfortunately no. Do you have any insights?

oranasraf avatar Oct 22 '18 15:10 oranasraf

@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 avatar Nov 06 '18 12:11 LitvinovAndrey

@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.

oranasraf avatar Nov 07 '18 16:11 oranasraf

@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.

andreyvolodko avatar Feb 21 '20 14:02 andreyvolodko