1
votes

I use this code to create all day event on Exchange 2010sp1:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
    <soap:Header>
        <t:RequestServerVersion Version="Exchange2007_SP1"/>
    </soap:Header>
    <soap:Body>
        <CreateItem xmlns="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" SendMeetingInvitations="SendToAllAndSaveCopy">
            <SavedItemFolderId>
                <t:DistinguishedFolderId Id="calendar"/>
            </SavedItemFolderId>
            <Items>
                <t:CalendarItem xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
                    <Subject>test event</Subject>
                    <Body BodyType="Text">my test event</Body>
                    <ReminderIsSet>false</ReminderIsSet>
                    <Start>2011-01-06T07:00:00Z</Start>
                    <End>2011-01-06T08:00:00Z</End>
                    <IsAllDayEvent>true</IsAllDayEvent>
                    <Location>test location</Location>
                    <t:MeetingTimeZone>
                        <t:BaseOffset>-PT2H</t:BaseOffset>
                        <t:Standard>
                            <t:Offset>P0D</t:Offset>
                            <t:RelativeYearlyRecurrence>
                                <t:DaysOfWeek>Sunday</t:DaysOfWeek>
                                <t:DayOfWeekIndex>Second</t:DayOfWeekIndex>
                                <t:Month>September</t:Month>
                            </t:RelativeYearlyRecurrence>
                            <t:Time>01:59:59</t:Time>
                        </t:Standard>
                        <t:Daylight>
                            <t:Offset>-PT1H</t:Offset>
                            <t:RelativeYearlyRecurrence>
                                <t:DaysOfWeek>Friday</t:DaysOfWeek>
                                <t:DayOfWeekIndex>First</t:DayOfWeekIndex>
                                <t:Month>April</t:Month>
                            </t:RelativeYearlyRecurrence>
                            <t:Time>03:00:00</t:Time>
                        </t:Daylight>
                    </t:MeetingTimeZone>
                </t:CalendarItem>
            </Items>
        </CreateItem>
    </soap:Body>
</soap:Envelope>

The meeting that get created spans over 2 days, I checked the timezone and locale on the client and server machines and they are correct, Using the same code one 2010 and 2007 works correctly. This issue was verified on another separate environment.

Any help or direction will be appreciated.

Thanks,

Eli

3

3 Answers

1
votes

Check http://calendarservermigration.blogspot.com/2010/12/ews-outlook-live-exchange-release.html where they describe of a similar problem. I have the same problem using the Exchange Web Services Managed API 1.1 library on Exchange 2010 as well as Exchange 2010 SP1.

I currently use new ExchangeService(ExchangeVersion.Exchange2007_SP1, TimeZoneInfo.Utc) when I connect to either Exchange Server 2007 or Exchange Server 2010 and it seems to work fine (if you don't require functionality that's available since Exchange Server 2010).

0
votes

Im using Exchange 2010, using <RequestServerVersion Version="Exchange2010_SP1"> gives me an error indicating MeetingTimeZone is deprecated, use StartTimeZone and/or EndTimeZone instead. See my explanation here Exchange 2010 Web Services - creation of an all day event appointment as to why its spanning 2 days.

0
votes

The issue was fixed by MS (after we reported them this issue), they reported it now fixed on Exchange2010 sp2.