<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>mstehle: The CDOs and CDONTS of Messaging Development : Exchange Web Services</title><link>http://blogs.msdn.com/mstehle/archive/tags/Exchange+Web+Services/default.aspx</link><description>Tags: Exchange Web Services</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Announcing EWSEditor 1.5!</title><link>http://blogs.msdn.com/mstehle/archive/2009/11/09/announcing-ewseditor-1-5.aspx</link><pubDate>Mon, 09 Nov 2009 19:37:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9919721</guid><dc:creator>mstehle</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/mstehle/comments/9919721.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mstehle/commentrss.aspx?PostID=9919721</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mstehle/rsscomments.aspx?PostID=9919721</wfw:comment><description>&lt;p&gt;Over the past year I’ve been working with the new &lt;a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=c3342fb3-fbcc-4127-becf-872c746840e1#tm"&gt;Exchange Web Services Managed API&lt;/a&gt; and I have to say, it’s a wonderful thing – especially compared to working with the &lt;a href="http://msdn.microsoft.com/en-us/library/bb402321.aspx"&gt;Visual Studio generated proxy classes&lt;/a&gt; for Exchange Web Services.&amp;#160; While working with Exchange Web Services (EWS) early in the Exchange 2007 release it became apparent to me that an editor tool in the spirit of &lt;a href="http://mfcmapi.codeplex.com/"&gt;MFCMAPI&lt;/a&gt; built on top of EWS might be useful.&amp;#160; At the time I started working on such an editor and based it off the Visual Studio generated proxy classes.&amp;#160; To my delight I was soon introduced to an API that the product team was working on to make my life (and that of any other EWS developer using .NET languages) much easier – the EWS Managed API.&lt;/p&gt;  &lt;p&gt;I immediately started work on converting my editor code from proxy classes to this new API.&amp;#160; This process was about 75% deleting code and 25% writing new EWS Managed API code.&amp;#160; I was replacing hundreds of lines of proxy class code with half as much (or less) EWS Managed API code.&amp;#160; Over the coming months I explored the features of the API and was able to quickly add new functionality to the editor because I could focus on UI code rather than wordy proxy class code.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Out of all of this work comes &lt;/strong&gt;&lt;a href="http://code.msdn.microsoft.com/ewseditor"&gt;&lt;strong&gt;EWSEditor&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;!&lt;/strong&gt;&amp;#160; This initial public release is called &lt;a href="http://code.msdn.microsoft.com/ewseditor/Release/ProjectReleases.aspx?ReleaseId=3491"&gt;version 1.5&lt;/a&gt; because it has been used internally for a while by my team.&amp;#160; There are still features I’m working on and basic API coverage that will come together over time.&amp;#160; It’s a work in progress but still very useful in its current state so I wanted to get it out to the public.&amp;#160; Please feel free to send me suggestions, comments, bugs, etc.&amp;#160; There is an &lt;a href="http://code.msdn.microsoft.com/ewseditor/WorkItem/List.aspx"&gt;Issue Tracker&lt;/a&gt; and &lt;a href="http://code.msdn.microsoft.com/ewseditor/Thread/List.aspx"&gt;Discussions&lt;/a&gt; page on the project site – feel free to use them.&lt;/p&gt;  &lt;p&gt;From the project site, here are the goals of &lt;a href="http://code.msdn.microsoft.com/ewseditor"&gt;EWSEditor&lt;/a&gt;…&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“1. Demonstrate the Exchange Web Services Managed API functionality and simplicity to developers through its source code.      &lt;br /&gt;2. Demonstrate the Exchange Web Services SOAP traffic used to perform actions initiated through an explorer user interface.       &lt;br /&gt;3. Assist non-developers in debugging and understanding Exchange stores by exploring items, folders, and their properties in depth. “&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;The plan right now is to do an update every two months (next one will be in January).&amp;#160; Since this is the first public release there might be an interim release if some blocking issue come up.&amp;#160; Available for download are release notes which I’ll add to with each release to track the changes over time and give an overview of what is new.&amp;#160; Here are the notes from the 1.5 release…&lt;/p&gt;  &lt;blockquote&gt;   &lt;h4&gt;&lt;/h4&gt;    &lt;p&gt;&lt;strong&gt;“1.5 Release – 11/6/2009&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;The first public release of EWS Editor! The basic feature set is still be flushed out but it is still a very useful tool. There are three feature areas of EWS Editor: General UI, Support Tools, and API Coverage. The focus of this release was to establish the UI design and flow of the application, solidify some useful support tools, and illustrate the direction of the application.&lt;/p&gt;    &lt;p&gt;There are some gaps in CRUD tasks across item and folder properties and items themselves. The major focus of upcoming releases will be to fill in these gaps before moving on to new features.”&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;If your interested, &lt;a href="http://code.msdn.microsoft.com/ewseditor/Release/ProjectReleases.aspx?ReleaseId=3491"&gt;download&lt;/a&gt; the source or just the binary and try it out.&amp;#160; Here are some the highlighted features from the release notes…&lt;/p&gt;  &lt;blockquote&gt;   &lt;h5&gt;Exchange Service Profiles&lt;/h5&gt;    &lt;p&gt;Exchange Service Profiles describe not only the connection information for calls specified in the &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.exchange.webservices.data.exchangeservice.aspx"&gt;ExchangeService&lt;/a&gt; class but also the root folder to use in the tree view of EWS Editor. Multiple ExchangeService objects can be displayed at one time using unique configurations. This allows folders on multiple servers and server versions to be displayed at one time or displaying the same folders using different credentials.&lt;/p&gt;    &lt;p&gt;Exchange Service Profiles can be saved to an XML file which contains the configuration information (sans specified passwords) so that it can be reloaded easily. If a profile requires credentials then a prompt will appear when loading the Services Profile to enter the credentials.&lt;/p&gt;    &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mstehle/WindowsLiveWriter/AnnouncingEWSEditor1.5_CD76/image_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/mstehle/WindowsLiveWriter/AnnouncingEWSEditor1.5_CD76/image_thumb_1.png" width="244" height="190" /&gt;&lt;/a&gt; &lt;a href="http://blogs.msdn.com/blogfiles/mstehle/WindowsLiveWriter/AnnouncingEWSEditor1.5_CD76/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/mstehle/WindowsLiveWriter/AnnouncingEWSEditor1.5_CD76/image_thumb.png" width="175" height="244" /&gt;&lt;/a&gt; &lt;/p&gt;    &lt;h5&gt;&lt;/h5&gt;    &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;    &lt;h5&gt;View properties of ExchangeServices, Folders, and Items&lt;/h5&gt;    &lt;p&gt;The PropertyDetailsGrid display first class properties for all nodes of the tree view starting with the root, ExchangeService node and all the way to the folder contents form, displaying first class properties for Items in a folder. Under the View menu the &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.exchange.webservices.data.propertyset.aspx"&gt;PropertySet&lt;/a&gt; used to retrieve item or folder data can be configured to customize which schema properties and extended properties are displayed in the PropertyDetailsGrid.&lt;/p&gt;    &lt;h5&gt;&lt;/h5&gt;    &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mstehle/WindowsLiveWriter/AnnouncingEWSEditor1.5_CD76/image_8.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/mstehle/WindowsLiveWriter/AnnouncingEWSEditor1.5_CD76/image_thumb_3.png" width="244" height="92" /&gt;&lt;/a&gt; &lt;a href="http://blogs.msdn.com/blogfiles/mstehle/WindowsLiveWriter/AnnouncingEWSEditor1.5_CD76/image_6.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/mstehle/WindowsLiveWriter/AnnouncingEWSEditor1.5_CD76/image_thumb_2.png" width="244" height="185" /&gt;&lt;/a&gt; &lt;/p&gt;    &lt;p&gt;&lt;b&gt;       &lt;br /&gt;&lt;/b&gt;&lt;/p&gt;    &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;    &lt;p&gt;&lt;b&gt;Extended Property Lookup&lt;/b&gt;&lt;/p&gt;    &lt;p&gt;A number of known extended MAPI properties have been indexed in EWS Editor. Extended properties can be added to the PropertyDetailsGrid through a look up using a known constant name for the property such as PR_SUBJECT, PidTagSubject, etc. An Extended Property Lookup tool provides a way to quickly get the property information for a known constant.&lt;/p&gt;    &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mstehle/WindowsLiveWriter/AnnouncingEWSEditor1.5_CD76/image_10.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/mstehle/WindowsLiveWriter/AnnouncingEWSEditor1.5_CD76/image_thumb_4.png" width="193" height="244" /&gt;&lt;/a&gt; &lt;/p&gt;    &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;    &lt;h5&gt;Request and response logging&lt;/h5&gt;    &lt;p&gt;While EWS Editor is running, all requests and responses are logged to a file. The Chatter Log tool is used to view the history of requests and responses.&lt;/p&gt;    &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mstehle/WindowsLiveWriter/AnnouncingEWSEditor1.5_CD76/image_12.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/mstehle/WindowsLiveWriter/AnnouncingEWSEditor1.5_CD76/image_thumb_5.png" width="244" height="184" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9919721" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+Web+Services/default.aspx">Exchange Web Services</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+Web+Services+Managed+API/default.aspx">Exchange Web Services Managed API</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/EWSEditor/default.aspx">EWSEditor</category></item><item><title>FYI: New Version of Exchange Remote Connectivity Analyzer Released (ExRCA) with new Exchange Web Service Tests!</title><link>http://blogs.msdn.com/mstehle/archive/2009/10/20/fyi-new-version-of-exchange-remote-connectivity-analyzer-released-exrca-with-new-exchange-web-service-tests.aspx</link><pubDate>Tue, 20 Oct 2009 18:43:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9910114</guid><dc:creator>mstehle</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/mstehle/comments/9910114.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mstehle/commentrss.aspx?PostID=9910114</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mstehle/rsscomments.aspx?PostID=9910114</wfw:comment><description>&lt;p&gt;From the &lt;a href="http://msexchangeteam.com/archive/2009/10/19/452905.aspx"&gt;Exchange Team blog&lt;/a&gt;:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“Today we released an updated version of the &lt;a href="https://www.testexchangeconnectivity.com"&gt;Exchange Remote Connectivity Analyzer&lt;/a&gt;. For those of you not familiar with this site, it is a Web-based tool that helps you troubleshoot connectivity issues. The tool simulates several client logon and mail flow scenarios. When a test fails, many of the errors have troubleshooting tips to assist you in correcting the problem. For more information, see our previous blog post &lt;a href="http://msexchangeteam.com/archive/2009/03/25/450908.aspx"&gt;here&lt;/a&gt;.&lt;/p&gt;    &lt;p&gt;…&lt;/p&gt;    &lt;p&gt;Additional tests&lt;/p&gt;    &lt;ul&gt;     &lt;li&gt;Exchange Web Services - This allows you to perform connectivity testing for Exchange Web Services client such as Entourage. Developers can also use the Service Account Verification test to ensure things are configured and working properly for access with an alternate account or Exchange Impersonation.”&lt;/li&gt;   &lt;/ul&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;a href="http://msexchangeteam.com/archive/2007/09/12/446988.aspx"&gt;Brad Hughes&lt;/a&gt; came up with this awesome tool and I’ve been working with him to add these EWS tests to ExRCA.&amp;#160; There are two basic tests that you can do at this time with Exchange Web Services: 1) Test the ability of an account to perform basic Exchange Web Services tasks like Synchronization, Notification, Availability, and OOF or 2) Test the ability of a service account to access a mailbox through delegate access or Exchange Impersonation.&amp;#160; The first set of tests may be more useful to Exchange Administrators testing for Entourage client connectivity and as well as Availability and OOF which are used by Outlook too.&amp;#160; The Service Account Access test is a quick way to test and diagnose issues with service accounts accessing other mailboxes.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mstehle/WindowsLiveWriter/FYINewVersionofExchangeRemoteConnectivit_CF1B/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/mstehle/WindowsLiveWriter/FYINewVersionofExchangeRemoteConnectivit_CF1B/image_thumb.png" width="586" height="363" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Both of these tests should be run against a test mailbox with an empty Inbox and Calendar folder because they will attempt to create and delete test items.&amp;#160; During the execution of the test ExRCA looks to ensure the Calendar and Inbox of the specified mailbox are empty before running.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9910114" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mstehle/archive/tags/FYI/default.aspx">FYI</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+Web+Services/default.aspx">Exchange Web Services</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>EWS: Exchange 2007 RTM vs. SP1 Specifying MeetingTimeZone's TimeZoneName when creating an Appointment</title><link>http://blogs.msdn.com/mstehle/archive/2009/09/04/ews-exchange-2007-rtm-vs-sp1-specifying-meetingtimezone-s-timezonename-when-creating-an-appointment.aspx</link><pubDate>Fri, 04 Sep 2009 20:17:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9891511</guid><dc:creator>mstehle</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/mstehle/comments/9891511.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mstehle/commentrss.aspx?PostID=9891511</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mstehle/rsscomments.aspx?PostID=9891511</wfw:comment><description>&lt;p&gt;Prior to Exchange 2007 SP1 an article was published with some specific guidance related to handling time zones in calendar item tasks.&amp;#160; Contrary to &lt;a href="http://msdn.microsoft.com/en-us/library/bb738399.aspx"&gt;Best Practices for Using Exchange Web Services for Calendaring Tasks&lt;/a&gt;, specifying just a MeetingTimeZone TimeZoneName when creating a CalendarItem appears to work in Exchange 2007 SP1 and later.&amp;#160; The best practices says not to submit the TimeZoneName in MeetingTimeZone because it will be ignored, though there is a hint that this might not apply to Exchange 2007 SP1: &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;“Do not supply the optional &lt;strong&gt;TimeZoneName&lt;/strong&gt; element when you create calendar items. In the initial release version of Exchange 2007, the &lt;strong&gt;TimeZoneName&lt;/strong&gt; element is ignored on incoming requests.”&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;However, take the following request which properly creates a CalendarItem in the Eastern time zone:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;t:CalendarItem&amp;gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;t:ItemClass&amp;gt;IPM.Appointment&amp;lt;/t:ItemClass&amp;gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;t:Subject&amp;gt;Appointment in Eastern Time&amp;lt;/t:Subject&amp;gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;t:Start&amp;gt;2009-06-26T09:00:00.000&amp;lt;/t:Start&amp;gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;t:End&amp;gt;2009-06-26T09:30:00.000&amp;lt;/t:End&amp;gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;t:MeetingTimeZone TimeZoneName=&amp;quot;Eastern Standard Time&amp;quot;&amp;gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/t:MeetingTimeZone&amp;gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/t:CalendarItem&amp;gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;From the best practices, the following statement intends to confirm that TimeZoneName is &lt;u&gt;not&lt;/u&gt; ignored in Exchange 2007 SP1 and can be used by itself to define a time zone:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;i&gt;“In Exchange Server 2007 Service Pack 1 (SP1), &lt;strong&gt;BaseOffset&lt;/strong&gt; is an optional element, and supports MeetingTimeZones that specify the TimeZoneName only.”&lt;/i&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;This is quite true in fact, were in Exchange 2007 pre-SP1 specifying the offset elements was a requirement and TimeZoneName was ignored; in Exchange 2007 post-SP1 the TimeZoneName is actually the preferred method for declaring a time zone.&amp;#160; Furthermore, offset and transition values should only be set when specifying a custom time zone.&amp;#160; Otherwise, standard time zones should be specified using TimeZoneName which is the name of the time zone as it appears in the registry key name on the Exchange CAS server.&amp;#160; Then the Exchange server will pull the transition and offset information from the registry for the time zone you specified.&amp;#160; Here is an image showing where the registry keys are:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/mstehle/WindowsLiveWriter/EWS.SP1SpecifyingMeetingTimeZonesTimeZon_BAF9/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/mstehle/WindowsLiveWriter/EWS.SP1SpecifyingMeetingTimeZonesTimeZon_BAF9/image_thumb.png" width="536" height="186" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Bottom line, with Exchange 2007 SP1 don’t specify time zone offset and transition values for known time zones – use the TimeZoneName instead.&amp;#160; This will help your application work seamlessly with any updates to known time zone definitions in the future.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9891511" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+Web+Services/default.aspx">Exchange Web Services</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+Web+Services+Managed+API/default.aspx">Exchange Web Services Managed API</category></item><item><title>EWS: UID not always the same for orphaned instances of the same meeting.</title><link>http://blogs.msdn.com/mstehle/archive/2009/09/02/ews-uid-not-always-the-same-for-orphaned-instances-of-the-same-meeting.aspx</link><pubDate>Wed, 02 Sep 2009 23:37:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9890565</guid><dc:creator>mstehle</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/mstehle/comments/9890565.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mstehle/commentrss.aspx?PostID=9890565</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mstehle/rsscomments.aspx?PostID=9890565</wfw:comment><description>&lt;P&gt;Earlier I &lt;A href="http://blogs.msdn.com/mstehle/archive/2009/05/29/info-ews-tips-and-tricks-links.aspx" mce_href="http://blogs.msdn.com/mstehle/archive/2009/05/29/info-ews-tips-and-tricks-links.aspx"&gt;linked&lt;/A&gt; to a &lt;A href="http://www.infinitec.de/post/2009/04/13/Searching-a-meeting-with-a-specific-UID-using-Exchange-Web-Services-2007.aspx" mce_href="http://www.infinitec.de/post/2009/04/13/Searching-a-meeting-with-a-specific-UID-using-Exchange-Web-Services-2007.aspx"&gt;post by Henning Krauses&lt;/A&gt; which discusses searching for a meeting using the &lt;A href="http://msdn.microsoft.com/en-us/library/bb891878.aspx" mce_href="http://msdn.microsoft.com/en-us/library/bb891878.aspx"&gt;UID&lt;/A&gt; and &lt;A href="http://msdn.microsoft.com/en-us/library/cc815676.aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc815676.aspx"&gt;GlobalObjectId&lt;/A&gt; properties.&amp;nbsp; The point of UID is to provide a unique identifier for a meeting across the calendars each attendee to the same meeting.&amp;nbsp; Henning gave some expert advise for using GlobalObjectId instead of UID in a FindItem request to locate instances of a recurring meeting in different user’s calendars.&amp;nbsp; As noted in his article, in Exchange 2007 pre-SP2 the UID property is built from GlobalObjectId – he even shows how to convert from UID to GlobalObjectId.&lt;/P&gt;
&lt;P&gt;Using GlobalObjectId poses a problem however…If you were to create a recurring appointment and invite one attendee for only one instance of that recurring appointment that attendee ends up with only the one exception instance of the parent recurring appointment in their calendar.&amp;nbsp; This is called an “orphaned” appointment.&amp;nbsp; This type of appointment’s GlobalObjectId has additional information in it related to the exception date (for more information look at PidLidGlobalObjectId in &lt;A href="http://msdn.microsoft.com/en-us/library/cc425490.aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc425490.aspx"&gt;MS-OXOCAL&lt;/A&gt;).&amp;nbsp; The bottom line here is that this orphaned instance in this one attendee’s calendar will have a GlobalObjectId, and therefore UID, which doesn’t match the related appointments in the other attendee’s and organizer’s calendar.&amp;nbsp; Henning’s code won’t work in this specific scenario…&lt;/P&gt;
&lt;P&gt;So what now?&amp;nbsp; Is this a bug in Exchange?&amp;nbsp; Is there another property Henning could use?&amp;nbsp; The answer to both questions is, yes!&lt;/P&gt;
&lt;P&gt;There is another property, &lt;A href="http://msdn.microsoft.com/en-us/library/cc839502.aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc839502.aspx"&gt;CleanGlobalObjectId&lt;/A&gt;, which was defined just for this scenario.&amp;nbsp; If you look at the documentation for this property, the remarks confirm that this property specifically addresses the issue described above:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;“The format of this property is the same as that of &lt;STRONG&gt;LID_GLOBAL_OBJID&lt;/STRONG&gt; (&lt;/EM&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/cc815676.aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc815676.aspx"&gt;&lt;EM&gt; PidLidGlobalObjectId&lt;/EM&gt;&lt;/A&gt;&lt;EM&gt;). The value of this property must be equal to the value of &lt;STRONG&gt;LID_GLOBAL_OBJID&lt;/STRONG&gt;, except the YH, YL, M, and D fields must be zero. All objects that refer to an Instance of a recurring series (including an orphan instance), as well as the recurring series itself, will have the same value for this property.”&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So all Henning needs to do in his sample is change it to use the CleanGlobalObjectId instead of GlobalObjectId.&amp;nbsp; Now, it would be logical to assume that Exchange should base the UID property off of the CleanGlobalObjectId too instead of GlobalObjectId.&amp;nbsp; In fact, we’ve done just that.&amp;nbsp; In Exchange 2007 SP2 UID is based on the CleanGlobalObjectId instead of GlobalObjectId.&amp;nbsp; Because SP2 just came out and many customers may wait to install it because of the schema changes you’ll want to keep the workaround above in mind when working with GlobalObjectId and UID in Exchange Web Services.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9890565" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+Web+Services/default.aspx">Exchange Web Services</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+Web+Services+Managed+API/default.aspx">Exchange Web Services Managed API</category></item><item><title>FYI: DeleteItem behavior, Exchange 2010 SDKs, EWS performance and SyncFolderItems, and Named Property Mapping in Exchnage 2007+</title><link>http://blogs.msdn.com/mstehle/archive/2009/07/13/fyi-deleteitem-behavior-exchange-2010-sdks-ews-performance-and-syncfolderitems-and-named-property-mapping-in-exchnage-2007.aspx</link><pubDate>Mon, 13 Jul 2009 18:30:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9831804</guid><dc:creator>mstehle</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/mstehle/comments/9831804.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mstehle/commentrss.aspx?PostID=9831804</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mstehle/rsscomments.aspx?PostID=9831804</wfw:comment><description>&lt;p&gt;Fellow developer support engineer, &lt;a href="http://blogs.msdn.com/pcreehan/"&gt;Patrick Creehan&lt;/a&gt;, has any &lt;a href="http://blogs.msdn.com/pcreehan/archive/2009/07/08/deleteitem-ignores-changekeys.aspx"&gt;interesting post&lt;/a&gt; about the delta between the documentation of DeleteItem calls and the actual behavior involving including the ChangeKey in the ItemId of the item you want to delete.&amp;#160; In theory the ChangeKey would be required for DeleteItem requests to ensure that you know you have evaluated the latest version of the item and decided to delete it.&amp;#160; If you pass an ItemId with a stale ChangeKey, you &lt;em&gt;should&lt;/em&gt; get a error indicating this isn’t the latest version of the item and you can retrieve it to make sure you still want to delete it.&amp;#160; This is how an UpdateItem request works.&amp;#160; As Patrick’s post indicates, DeleteItem doesn’t work the same way UpdateItem works – it just ignores the ChangeKey and does the delete no matter what.&amp;#160; Patrick has a workaround to provide similar functionality in case you need it.&lt;/p&gt;  &lt;p&gt;…&lt;/p&gt;  &lt;p&gt;The Exchange API team &lt;a href="http://blogs.msdn.com/exchangedev/archive/2009/06/04/the-exchange-2010-beta-sdks-are-here.aspx"&gt;announced&lt;/a&gt;, they’ve posted a beta SDK for Exchange 2010 on MSDN.&amp;#160; In their post they highlight the most notable change in the structure of this SDK:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;“…For earlier product releases, all Exchange developer documentation is included in a single SDK. For Exchange 2010, documentation for each technology area is published in a separate SDK, making it quicker and easier for you to find information that you need. The following SDKs are available &lt;/em&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=153354"&gt;&lt;em&gt;online&lt;/em&gt;&lt;/a&gt;&lt;em&gt; for Exchange 2010 Beta: &lt;/em&gt;&lt;/p&gt;    &lt;ul&gt;     &lt;li&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=152942"&gt;&lt;em&gt;Exchange 2010 Beta Web Services SDK June 2009&lt;/em&gt;&lt;/a&gt;&lt;/li&gt;      &lt;li&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=153302"&gt;&lt;em&gt;Exchange 2010 Beta Transport Agents SDK June 2009&lt;/em&gt;&lt;/a&gt;&lt;/li&gt;      &lt;li&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=153303"&gt;&lt;em&gt;Exchange 2010 Beta Backup and Restore SDK June 2009&lt;/em&gt;&lt;/a&gt;&lt;em&gt;…”&lt;/em&gt;&lt;/li&gt;   &lt;/ul&gt; &lt;/blockquote&gt;  &lt;p&gt;…&lt;/p&gt;  &lt;p&gt;Henning Krause posted a couple interesting articles that go along with my earlier, performance themed EWS posts (&lt;a href="http://blogs.msdn.com/mstehle/archive/2008/07/17/outbox-understanding-and-fixing-slow-exchange-web-services-code-part-1.aspx"&gt;part 1&lt;/a&gt; &amp;amp; &lt;a href="http://blogs.msdn.com/mstehle/archive/2008/08/13/outbox-understanding-and-fixing-slow-exchange-web-services-code-part-2.aspx"&gt;part 2&lt;/a&gt;).&amp;#160; His &lt;a href="http://www.infinitec.de/post/2009/06/07/Processing-items-in-an-Exchange-folder-using-EWS-Managed-API.aspx"&gt;first post&lt;/a&gt; is about processing items in a folder using the EWS Managed API, he walks through some of missteps I see customer make when they complain about how “slow” EWS is – as he points out it often comes down to choosing the right tool for the job and synchronization is often over looked by novice EWS developers who choose to loop through an entire folder looking for changes instead.&amp;#160; His &lt;a href="http://www.infinitec.de/post/2009/06/07/FindItems-and-SyncFolderItems-performance.aspx"&gt;second post&lt;/a&gt; is more about limiting the requested PropertySet to increase the performance of your EWS code – something I have &lt;a href="http://blogs.msdn.com/mstehle/archive/2008/08/13/outbox-understanding-and-fixing-slow-exchange-web-services-code-part-2.aspx"&gt;pointed out&lt;/a&gt; earlier with GetItem and FindItem calls but it is good to reinforce this concept in SyncFolderItem calls as well.&amp;#160; &lt;/p&gt;  &lt;p&gt;Speaking of GetItem vs. FindItem calls – Henning has a &lt;a href="http://www.infinitec.de/post/2009/06/09/Getting-the-body-of-an-Email-with-a-FindItems-request.aspx"&gt;third post&lt;/a&gt; which shows you how to get the message body with a FindItem request even though technically you can’t request the “item:body” schema property in a FindItem’s PropertySet.&amp;#160; His post points out an important concept which is that schema properties (or “first class properties” as they are sometimes called) are tied back to extended properties which are the “raw values”.&amp;#160; Often times certain limitations are applied to the schema properties because they calculations can be expensive or unavailable at a certain time – however in some cases you can get around this by using and understanding the correlating extended properties.&lt;/p&gt;  &lt;p&gt;…&lt;/p&gt;  &lt;p&gt;Jason Nelson posted a couple items (&lt;a href="http://msexchangeteam.com/archive/2009/04/06/451003.aspx"&gt;round 1&lt;/a&gt; and &lt;a href="http://msexchangeteam.com/archive/2009/06/11/451596.aspx"&gt;round 2&lt;/a&gt;) on the Exchange team blog about named property mapping detailng the history and problems with this mapping and upcoming changes in Exchange 2007 SP2 and Exchange 2010.&amp;#160; Most notable from the “round 2” post is that in Exchange 2007 SP2 and Exchange 2010 &lt;em&gt;“…no x-headers are ever promoted to individual properties if a client has not already requested (and mapped) them. Not even authenticated submissions can create new named property mappings.”&lt;/em&gt;&amp;#160; This could pose a problem if your application relies on these headers to do processing, if you are using an Exchange API with property access like EWS, MAPI, CDO 1.21, WebDAV, or Outlook 2007+ object model then fear not, &lt;em&gt;“…x-headers are still stored in PR_TRANSPORT_HEADERS and still accessible to MAPI clients but they are not individual properties.”&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;However, if your application uses IMAP the story is different…&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;“Exchange2007 does not contain an STM file - it doesn't save the original mime content. Messages are converted to MAPI. IMAP has the ability to search based on header values, but if these are not promoted, the result is that the message is not contained in the results. If a client has previously mapped t he header in question (a MAPI client) then messages delivered after this will have the x-header promoted as an individual property.”&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9831804" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+Web+Services/default.aspx">Exchange Web Services</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+Web+Services+Managed+API/default.aspx">Exchange Web Services Managed API</category></item><item><title>FYI: Can’t use Exchange Impersonation with GetUserOofSettings, SetUserOofSettings, or GetUserAvailability</title><link>http://blogs.msdn.com/mstehle/archive/2009/06/24/fyi-can-t-use-exchange-impersonation-with-getuseroofsettings-setuseroofsettings-or-getuseravailability.aspx</link><pubDate>Wed, 24 Jun 2009 23:45:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9802095</guid><dc:creator>mstehle</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/mstehle/comments/9802095.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mstehle/commentrss.aspx?PostID=9802095</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mstehle/rsscomments.aspx?PostID=9802095</wfw:comment><description>&lt;p&gt;&lt;font size="1"&gt;I kept forgetting about this so maybe blogging it will help me remember.&amp;#160; As &lt;/font&gt;&lt;a href="http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/3bede794-9940-4635-a687-24c05b313f8b/"&gt;&lt;font size="1"&gt;this thread&lt;/font&gt;&lt;/a&gt;&lt;font size="1"&gt; confirms – you can’t call GetUserOofSettings, SetUserOofSettings, or GetUserAvailability when using Exchange Impersonation.&amp;#160; If you try to do this you’ll get an error that the Service Account is not the mailbox owner.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1"&gt;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9802095" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mstehle/archive/tags/FYI/default.aspx">FYI</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+Web+Services/default.aspx">Exchange Web Services</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+Web+Services+Managed+API/default.aspx">Exchange Web Services Managed API</category></item><item><title>Exchange API Team Blog: Exchange Impersonation vs. Delegate Access…</title><link>http://blogs.msdn.com/mstehle/archive/2009/06/16/exchange-api-team-blog-exchange-impersonation-vs-delegate-access.aspx</link><pubDate>Tue, 16 Jun 2009 17:34:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9762435</guid><dc:creator>mstehle</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/mstehle/comments/9762435.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mstehle/commentrss.aspx?PostID=9762435</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mstehle/rsscomments.aspx?PostID=9762435</wfw:comment><description>&lt;p&gt;The Exchange API team has a new &lt;a href="http://blogs.msdn.com/exchangedev/archive/2009/06/15/exchange-impersonation-vs-delegate-access.aspx"&gt;post&lt;/a&gt; to explaining the differences between using Exchange Impersonation vs. Delegate Access to access an Exchange mailbox using Exchange Web Services.&amp;#160; I’ve seen first hand that there is a gap in understanding the difference between the two and when to use one versus the other.&amp;#160; This post goes a long way to address some of the confusion.&lt;/p&gt;  &lt;p&gt;An important note that some people miss is the differentiation between Windows and Exchange impersonation – they’re not the same thing and more importantly, they aren’t even related…&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;“Exchange Impersonation is different than Windows Impersonation. Windows Impersonation is an operating system concept that requires you to set Kerberos constrained delegation. Exchange Impersonation is a simpler authorization mechanism that is designed for use only within Exchange Web Services (EWS). For more information about Windows Impersonation, see &lt;/em&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa376391(VS.85).aspx"&gt;&lt;em&gt;Client Impersonation&lt;/em&gt;&lt;/a&gt;&lt;em&gt; on MSDN.”&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Conversely, the posts describes delegate access as…&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;“Delegate access is used in scenarios in which there needs to be a one-to-one relationship between users. One common application of delegate access is the sharing of calendars between users, such as when an admin manages an executive’s calendar, or a when handful of individuals working on a project need to coordinate calendars…&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;…Individual users can grant and remove delegate access to their own mailboxes through several mailbox clients, such as Microsoft Outlook, Outlook Web Access, or Exchange Web Services-based clients. A mailbox owner does not need administrator rights to grant another user delegate access to their mailbox.”&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;…To be clear, delegate access &lt;u&gt;can&lt;/u&gt; be granted by an administrator on an entire mailbox (but not to specific folders within the mailbox) using the &lt;a href="http://technet.microsoft.com/en-us/library/bb124097.aspx"&gt;Add-MailboxPermission&lt;/a&gt; cmdlet but as the above statement points out individuals can also grant delegate access for other users to access specific folders in their mailbox or the entire mailbox.&lt;/p&gt;  &lt;p&gt;A major difference between impersonation and delegation is that as far as Exchange Web Services and Outlook Web Access are concerned there is no way to assign a single delegate access to multiple mailboxes expect by establishing the delegate relationship for each individual mailbox.&amp;#160; I’ve talked about this &lt;a href="http://blogs.msdn.com/mstehle/archive/2007/09/07/kb-exchange-web-services-does-not-honor-inherited-permissions-from-server-level-objects.aspx"&gt;before&lt;/a&gt;, the Exchange team describes it this way…&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;“For delegate access, there is no option to set up a single delegate for multiple mailboxes. A relationship must be established for each user who needs to access a given mailbox…&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;…You must explicitly grant delegate access for any new users who are added.”&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;…This is a great post and a worthwhile read but from working with many customers to help them understand these concepts, I’d like to add some additional information and emphasize some key points…&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Understanding the Requests&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;To emphasize a side point in the blog post there are &lt;u&gt;three&lt;/u&gt; methods of mailbox to access a mailbox: Exchange Impersonation, Delegate Access, and Direct Logon.&amp;#160; The article doesn’t provide examples of what the XML looks like in each type of access request using Exchange Web Services.&amp;#160; For understanding, I’ve provided them below…&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;Direct Logon&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&amp;lt;GetFolder&amp;gt;     &lt;br /&gt;&amp;#160; &amp;lt;FolderShape&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;t:BaseShape&amp;gt;AllProperties&amp;lt;/t:BaseShape&amp;gt;      &lt;br /&gt;&amp;#160; &amp;lt;/FolderShape&amp;gt;      &lt;br /&gt;&amp;#160; &amp;lt;FolderIds&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;t:DistinguishedFolderId Id=&amp;quot;inbox&amp;quot;/&amp;gt;      &lt;br /&gt;&amp;#160; &amp;lt;/FolderIds&amp;gt;      &lt;br /&gt;&amp;lt;/GetFolder&amp;gt; &lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Delegate Access&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&amp;lt;GetFolder&amp;gt;     &lt;br /&gt;&amp;#160; &amp;lt;FolderShape&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;t:BaseShape&amp;gt;AllProperties&amp;lt;/t:BaseShape&amp;gt;      &lt;br /&gt;&amp;#160; &amp;lt;/FolderShape&amp;gt;      &lt;br /&gt;&amp;#160; &amp;lt;FolderIds&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;t:DistinguishedFolderId Id=&amp;quot;inbox&amp;quot;&amp;gt;      &lt;br /&gt;&lt;font color="#ff0000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;t:Mailbox&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;t:EmailAddress&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;a href="mailto:someoneelse@contoso.com"&gt;&lt;font color="#ff0000"&gt;someoneelse@contoso.com&lt;/font&gt;&lt;/a&gt;      &lt;br /&gt;&lt;font color="#ff0000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/t:EmailAddress&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/t:Mailbox&amp;gt;        &lt;br /&gt;&lt;/font&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/t:DistinguishedFolderId&amp;gt;      &lt;br /&gt;&amp;#160; &amp;lt;/FolderIds&amp;gt;      &lt;br /&gt;&amp;lt;/GetFolder&amp;gt; &lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Exchange Impersonation&lt;/strong&gt; &lt;/p&gt;    &lt;p&gt;&amp;lt;soap:Header&amp;gt;     &lt;br /&gt;&lt;font color="#ff0000"&gt;&amp;#160; &amp;lt;t:ExchangeImpersonation&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;t:ConnectingSID&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;t:PrimarySmtpAddress&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; someone@contoso.com        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/t:PrimarySmtpAddress&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/t:ConnectingSID&amp;gt;        &lt;br /&gt;&amp;#160; &amp;lt;/t:ExchangeImpersonation&amp;gt;&lt;/font&gt;      &lt;br /&gt;&amp;lt;/soap:Header&amp;gt;      &lt;br /&gt;&amp;lt;soap:Body&amp;gt;      &lt;br /&gt;&amp;#160; &amp;lt;GetFolder&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;FolderShape&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;t:BaseShape&amp;gt;AllProperties&amp;lt;/t:BaseShape&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/FolderShape&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;FolderIds&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;t:DistinguishedFolderId Id=&amp;quot;inbox&amp;quot;/&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/FolderIds&amp;gt;      &lt;br /&gt;&amp;#160; &amp;lt;/GetFolder&amp;gt;      &lt;br /&gt;&amp;lt;/soap:Body&amp;gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;…The example above is for &lt;em&gt;explicit&lt;/em&gt; delegate access.&amp;#160; You can also access a mailbox using &lt;em&gt;implicit&lt;/em&gt; delegate access by specifying a FolderId which links to another mailbox.&amp;#160; All Ids returned by EWS embed their mailbox information in them so requesting them without explicitly specifying a mailbox will also work.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Putting It All Together&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The terms used here come from the way Exchange Impersonation (also called &lt;a href="http://msdn.microsoft.com/en-us/library/aa579435.aspx"&gt;Server-to-Server or S2S Authentication&lt;/a&gt;) is explained in the Inside Exchange Web Services book.&amp;#160; The book describes three types of accounts that come into play when accessing a mailbox: the Service account, the Act As account, and the Mailbox account.&amp;#160; Understanding how these accounts are affected by different mailbox access types is important.&amp;#160; The Service account is the account used to generate the XML requests and authenticate to the virtual directory, the Act As account is the account which will be used to authorize actions taken against a mailbox, and the Mailbox account is the actual resource you are trying to access.&amp;#160; In the grid below suppose you have an EWS application which runs as a user called ApplicationAccount, here is how the different access types affect each account context…&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="1112"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="141"&gt;&lt;strong&gt;Access Type&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="146"&gt;&lt;strong&gt;Service Account&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="350"&gt;&lt;strong&gt;Act As Account&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="473"&gt;&lt;strong&gt;Mailbox Account&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="141"&gt;Exchange Impersonation&lt;/td&gt;        &lt;td valign="top" width="146"&gt;ApplicationAccount&lt;/td&gt;        &lt;td valign="top" width="350"&gt;the impersonated account as specified in the &lt;a href="http://msdn.microsoft.com/en-us/library/aa565690.aspx"&gt;ExchangeImpersonation&lt;/a&gt; property of the request&lt;/td&gt;        &lt;td valign="top" width="473"&gt;any mailbox that the &lt;u&gt;Act As account&lt;/u&gt; has mailbox rights to through Add-MailboxPermission or through permissions granted through Outlook, OWA, or EWS directly on a mailbox folder.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="141"&gt;Delegate Access&lt;/td&gt;        &lt;td valign="top" width="146"&gt;ApplicationAccount&lt;/td&gt;        &lt;td valign="top" width="350"&gt;always ApplicationAccount&lt;/td&gt;        &lt;td valign="top" width="473"&gt;any account or mailbox folder that &lt;u&gt;ApplicationAccount&lt;/u&gt; has mailbox rights to through Add-MailboxPermission or through permissions granted through Outlook, OWA, or EWS directly on a mailbox folder.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="141"&gt;Direct Logon&lt;/td&gt;        &lt;td valign="top" width="146"&gt;ApplicationAccount&lt;/td&gt;        &lt;td valign="top" width="350"&gt;always ApplicationAccount&lt;/td&gt;        &lt;td valign="top" width="473"&gt;always ApplicationAccount&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9762435" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+General/default.aspx">Exchange General</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+Web+Services/default.aspx">Exchange Web Services</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+Web+Services+Managed+API/default.aspx">Exchange Web Services Managed API</category></item><item><title>FYI: The Exchange Web Services Managed API is here!</title><link>http://blogs.msdn.com/mstehle/archive/2009/04/20/fyi-the-exchange-web-services-managed-api-is-here.aspx</link><pubDate>Mon, 20 Apr 2009 18:15:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9556799</guid><dc:creator>mstehle</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/mstehle/comments/9556799.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mstehle/commentrss.aspx?PostID=9556799</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mstehle/rsscomments.aspx?PostID=9556799</wfw:comment><description>&lt;p&gt;As you might have seen, we &lt;a href="http://blogs.msdn.com/exchangedev/"&gt;announced&lt;/a&gt; last week that the Exchange Web Services Managed API is now available as a &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=a8c9d043-c66c-4971-9459-8d1df1608c8b&amp;amp;displaylang=en"&gt;beta download&lt;/a&gt;.&amp;#160; I’ve been working with the API internally for about a year now and I must say, if you are writing .NET code that uses Exchange Web Services there’s no better way to do it.&amp;#160; I’ve been working on an Exchange browser application, similar to MFCMAPI which started out leveraging the &lt;a href="http://msdn.microsoft.com/en-us/library/bb402321.aspx"&gt;auto-generated proxy classes&lt;/a&gt;.&amp;#160; Switching this project over to the EWS Managed API cut down &lt;em&gt;hundreds&lt;/em&gt; of lines of code and improved the readability and organization of the code immensely.&amp;#160; (Stay tuned for more information on this project…)&lt;/p&gt;  &lt;p&gt;From &lt;a href="http://msdn.microsoft.com/en-us/library/dd637749.aspx"&gt;David Claux’s introduction&lt;/a&gt;:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;“The EWS Managed API is a fully object-oriented API that provides the experience developers have come to expect from Visual Studio and the Microsoft .NET Framework. Built on the EWS XML protocol, it provides an easy-to-learn, easy–to-use, and easy-to-maintain .NET interface to Exchange Web Services that both beginner and advanced developers will find to be an improvement over autogenerated proxies.&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;Although the EWS Managed API is a new API (in the sense that it is a new .NET assembly that developers have to explicitly reference in their applications), it is important to understand that &lt;strong&gt;we are not replacing the EWS protocol&lt;/strong&gt;. The EWS Managed API is just a complement to EWS for .NET developers. This means that &lt;strong&gt;your prior investments are safe&lt;/strong&gt;. Whether you are using raw XML (if you are a Javascript developer, for example) or autogenerated proxies (on Windows or other operating systems) to talk to EWS, your existing EWS applications will continue to work. The EWS protocol is still the future of Exchange development; all new features will continue to be added to the EWS protocol, and will also be exposed in the EWS Managed API.”&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;The API at it’s simplest is just a set of proxy classes for interacting with Exchange – they still generate the same Exchange Web Services SOAP XML that the auto-generated proxy classes do or that your code that doesn’t use proxy classes do.&amp;#160; The difference is that this API is easy to use, understand, and has some additional business logic included.&amp;#160; The release of this API doesn’t change the support or our recommendations towards use of Exchange Web Services in their raw form.&lt;/p&gt;  &lt;p&gt;Here are Matt’s three rules for getting started:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Check out &lt;a href="http://msdn.microsoft.com/en-us/library/dd637749.aspx"&gt;David Claux’s introduction&lt;/a&gt; for the API on MSDN as well as the &lt;a href="http://msdn.microsoft.com/en-us/library/dd633696.aspx"&gt;“Working with…” section&lt;/a&gt; of the MSDN reference. &lt;/li&gt;    &lt;li&gt;Don’t confuse the &lt;a href="http://msdn.microsoft.com/en-us/library/bb402321.aspx"&gt;Exchange Web Services Managed Reference&lt;/a&gt; with the &lt;a href="http://msdn.microsoft.com/en-us/library/dd635461.aspx"&gt;EWS Managed API Reference&lt;/a&gt;.&amp;#160; The Exchange Web Services Managed Reference in the MSDN is reference of the auto-generated proxy classes. &lt;/li&gt;    &lt;li&gt;For the sake of my sanity &lt;strong&gt;&lt;em&gt;&lt;u&gt;please don’t start calling this the EWS MAPI&lt;/u&gt;&lt;/em&gt;&lt;/strong&gt; – it’s the EWS Managed API, the EWS API, the EWS Client API, &lt;em&gt;The&lt;/em&gt; API, Managed EWS, anything you want that doesn’t involve acronyms shared with other Exchange APIs.&amp;#160; (I guess I should be happy they didn’t call it EWS CDO, right?) &lt;/li&gt; &lt;/ol&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9556799" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+Web+Services/default.aspx">Exchange Web Services</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+Web+Services+Managed+API/default.aspx">Exchange Web Services Managed API</category></item><item><title>KB: XML schema validation errors when Exchange Web Service requests and responses have invalid XML characters</title><link>http://blogs.msdn.com/mstehle/archive/2009/02/12/xml-schema-validation-errors-when-exchange-web-service-requests-and-responses-have-invalid-xml-characters.aspx</link><pubDate>Fri, 13 Feb 2009 02:23:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9416212</guid><dc:creator>mstehle</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/mstehle/comments/9416212.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mstehle/commentrss.aspx?PostID=9416212</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mstehle/rsscomments.aspx?PostID=9416212</wfw:comment><description>&lt;p&gt;&lt;em&gt;…I recently submitted the following KB article for publication but wanted to get the content out.&amp;#160; I will update this post when the KB article is published…&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;SYMPTOMS&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Scenario 1&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;When you submit an Exchange Web Services request to Microsoft Exchange Server 2007 that contains invalid XML characters, you may get the following &lt;i&gt;ErrorSchemaValidation&lt;/i&gt; exception response:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;i&gt;“The request failed schema validation: [character], hexadecimal value [value], is an invalid character.”&lt;/i&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;i&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p&gt;Scenario 2&lt;/p&gt;  &lt;p&gt;When you submit an Exchange Web Services request to Microsoft Exchange Server 2007 that returns item properties in the response containing invalid XML characters using the Visual Studio auto-generated proxy classes, you may get the following &lt;i&gt;InvalidOperationException &lt;/i&gt;exception:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;i&gt;”There is an error in XML document”&lt;/i&gt;&lt;/p&gt;    &lt;p&gt;&lt;i&gt;“[character] hexadecimal value [value], is an invalid character.”&lt;/i&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;CAUSE&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;It is possible for Exchange item properties to have values that contain characters outside the valid range in the XML specification which is defined here:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://www.w3.org/TR/2000/WD-xml-2e-20000814#dt-character"&gt;http://www.w3.org/TR/2000/WD-xml-2e-20000814#dt-character&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;When an Exchange Web Services client makes a request to retrieve that item property, the Exchange server encodes the property values to ensure the response is transmittable.&amp;#160; If this response is received by the client and subsequently validated against the XML schema, it will fail validation because of the invalid XML characters.&lt;/p&gt;  &lt;p&gt;Conversely, if an Exchange Web Services client tries to send these characters in a request, even if they are encoded, the Exchange server will try and validate the request against the XML schema which will fail.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;RESOLUTION&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Scenario 1&lt;/p&gt;  &lt;p&gt;There is no way to successfully post an Exchange Web Service request that contains invalid XML characters.&amp;#160; If you are updating a property’s value that contains invalid characters you must decide whether to replace or omit these characters.&lt;/p&gt;  &lt;p&gt;Scenario 2&lt;/p&gt;  &lt;p&gt;In order to read Exchange Web Service responses from Microsoft Exchange Server 2007 that contain invalid XML characters, you should skip XML validation. If you are using the Visual Studio auto-generated proxy classes for Exchange Web Services then you can create a special partial class which overrides the GetReaderForMessage method of the ExchangeServiceBinding class which turns XML validation off:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;span style="color: blue"&gt;public partial class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;MyExchangeServiceBinding&lt;/span&gt;: &lt;span style="color: #2b91af"&gt;ExchangeServiceBinding        &lt;br /&gt;&lt;/span&gt;{       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;protected override&lt;/span&gt;&lt;span style="color: #2b91af"&gt;XmlReader &lt;/span&gt;GetReaderForMessage(       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #2b91af"&gt;SoapClientMessage &lt;/span&gt;message,       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;int &lt;/span&gt;bufferSize)       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #2b91af"&gt;XmlReader &lt;/span&gt;retval = &lt;span style="color: blue"&gt;base&lt;/span&gt;.GetReaderForMessage(       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; message,       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; bufferSize);       &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #2b91af"&gt;XmlTextReader &lt;/span&gt;xrt = retval &lt;span style="color: blue"&gt;as&lt;/span&gt;&lt;span style="color: #2b91af"&gt;XmlTextReader&lt;/span&gt;;       &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;if&lt;/span&gt;(&lt;span style="color: blue"&gt;null&lt;/span&gt;!= xrt)       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; xrt.Normalization = &lt;span style="color: blue"&gt;false&lt;/span&gt;;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }       &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;return&lt;/span&gt;retval;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }       &lt;br /&gt;}&lt;/p&gt;&lt;/blockquote&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9416212" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mstehle/archive/tags/KB/default.aspx">KB</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+Web+Services/default.aspx">Exchange Web Services</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>Jason Henderson: A Brief History and Exciting Future for Exchange Development</title><link>http://blogs.msdn.com/mstehle/archive/2008/12/12/jason-henderson-a-brief-history-and-exciting-future-for-exchange-development.aspx</link><pubDate>Fri, 12 Dec 2008 18:42:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9202523</guid><dc:creator>mstehle</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/mstehle/comments/9202523.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mstehle/commentrss.aspx?PostID=9202523</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mstehle/rsscomments.aspx?PostID=9202523</wfw:comment><description>&lt;P&gt;&lt;FONT size=2 face=Arial&gt;It took me forever to get around to watching this but this is just a great presentation about Exchange development’s future at PDC.&amp;nbsp; He does a great job of explaining where we’ve been as well…&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/exchangedev/archive/2008/10/15/learn-about-the-exchange-web-services-managed-api-and-how-exchange-is-getting-cloud-ready-at-pdc-08.aspx" target=_blank mce_href="http://blogs.msdn.com/exchangedev/archive/2008/10/15/learn-about-the-exchange-web-services-managed-api-and-how-exchange-is-getting-cloud-ready-at-pdc-08.aspx"&gt;&lt;FONT size=2 face=Arial&gt;Learn about the Exchange Web Services Managed API and how Exchange is getting “Cloud Ready” at PDC’08&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face=Arial&gt;This is an absolute must watch for any Exchange developer!&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9202523" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+General/default.aspx">Exchange General</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+Web+Services/default.aspx">Exchange Web Services</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+Web+Services+Managed+API/default.aspx">Exchange Web Services Managed API</category></item><item><title>FYI: Exchange API spotting - Exchange 2007 SP1 RU4 Released</title><link>http://blogs.msdn.com/mstehle/archive/2008/10/08/fyi-exchange-api-spotting-exchange-2007-sp1-ru4-released.aspx</link><pubDate>Wed, 08 Oct 2008 22:00:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8991871</guid><dc:creator>mstehle</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/mstehle/comments/8991871.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mstehle/commentrss.aspx?PostID=8991871</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mstehle/rsscomments.aspx?PostID=8991871</wfw:comment><description>&lt;p&gt;&lt;font face="Arial" size="2"&gt;The &lt;/font&gt;&lt;a href="http://blogs.msdn.com/exchangedev/default.aspx" target="_blank"&gt;&lt;font face="Arial" size="2"&gt;Exchange Development Blog&lt;/font&gt;&lt;/a&gt;&lt;font face="Arial" size="2"&gt; has a new &lt;/font&gt;&lt;a href="http://blogs.msdn.com/exchangedev/archive/2008/10/07/exchange-web-services-update-rollup-4-roundup.aspx" target="_blank"&gt;&lt;font face="Arial" size="2"&gt;post&lt;/font&gt;&lt;/a&gt;&lt;font face="Arial" size="2"&gt; about the recently released &lt;/font&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=8B492ED2-EA92-412F-A852-3AA1C58D9499&amp;amp;displaylang=en" target="_blank"&gt;&lt;font face="Arial" size="2"&gt;Rollup 4 for Exchange 2007 SP 1&lt;/font&gt;&lt;/a&gt;&lt;font face="Arial" size="2"&gt;.&amp;#160; There are several key changes to Exchange Web Services in this release that are discussed in the post…&lt;/font&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Arial" size="2"&gt;“…If you have written code against Exchange Web Services, we definitely recommend that you take a look at RU4. The following are the biggest changes that will be coming in the rollup:&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Arial" size="2"&gt;- Item IDs are now returned after MoveItem/CopyItem calls.&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Arial" size="2"&gt;- Unknown/unsupported item types are returned as Messages.&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Arial" size="2"&gt;- Updating tasks can now have correct behavior for Start and Complete Date values…&amp;quot;&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8991871" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+2007/default.aspx">Exchange 2007</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+Web+Services/default.aspx">Exchange Web Services</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>OUTBOX: Understanding and Fixing Slow Exchange Web Services Code (Part 2)</title><link>http://blogs.msdn.com/mstehle/archive/2008/08/13/outbox-understanding-and-fixing-slow-exchange-web-services-code-part-2.aspx</link><pubDate>Thu, 14 Aug 2008 00:09:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8861017</guid><dc:creator>mstehle</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/mstehle/comments/8861017.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mstehle/commentrss.aspx?PostID=8861017</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mstehle/rsscomments.aspx?PostID=8861017</wfw:comment><description>&lt;P&gt;&lt;FONT size=2 face=Arial&gt;&lt;EM&gt;In &lt;/EM&gt;&lt;A href="http://blogs.msdn.com/mstehle/archive/2008/07/17/outbox-understanding-and-fixing-slow-exchange-web-services-code-part-1.aspx" mce_href="http://blogs.msdn.com/mstehle/archive/2008/07/17/outbox-understanding-and-fixing-slow-exchange-web-services-code-part-1.aspx"&gt;&lt;EM&gt;part 1&lt;/EM&gt;&lt;/A&gt;&lt;EM&gt; of this series I showed how to and the importance of doing the minimal number of requests, emphasizing the use of the &lt;A href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx"&gt;IdOnly&lt;/A&gt; shape until we really needed more properties.&amp;nbsp; I also illustrated the effect of batching requests and finding a balance between the number of items requested in a batch and the total time to retrieve a set of items...&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face=Arial&gt;Even after applying these techniques in the calendar folder performance can still suffer.&amp;nbsp; Doing an &lt;A href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx"&gt;AllProperties&lt;/A&gt; request for even a single item in the calendar can be exponentially slower than an &lt;A href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx"&gt;AllProperties&lt;/A&gt; request for a single item in the inbox (or other "non-calendar" folder).&amp;nbsp; Since Exchange's genesis the calendar folder has always been a special case when writing client applications - there is a ton of business logic and background processing that goes on to make everything work just right.&amp;nbsp; Because of this, it might be tempting to just write off this performance hit to the "crazy 'ole calendar folder" but there is an answer and it lies in exactly what properties are requested on each item during an &lt;A href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx"&gt;AllProperties&lt;/A&gt; request on a &lt;A href="http://msdn.microsoft.com/en-us/library/aa564765(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa564765(EXCHG.80).aspx"&gt;CalendarItem&lt;/A&gt;...&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face=Arial&gt;&lt;STRONG&gt;Understand the AllProperties BaseShape and Schema Properties&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face=Arial&gt;It turns out that this is a key concept in Exchange Web Services (read more &lt;A href="http://msdn.microsoft.com/en-us/library/cc720859(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc720859(EXCHG.80).aspx"&gt;here&lt;/A&gt;).&amp;nbsp; There is no &lt;A href="http://msdn.microsoft.com/en-us/library/aa123696(EXCHG.65).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa123696(EXCHG.65).aspx"&gt;SELECT *&lt;/A&gt; or &lt;A href="http://msdn.microsoft.com/en-us/library/cc765749.aspx"&gt;GetProps(NULL)&lt;/A&gt;&amp;nbsp; in EWS, clients should know what properties they want to request and request explicitly.&amp;nbsp; What about the &lt;A href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx"&gt;AllProperties&lt;/A&gt; shape?&amp;nbsp; Doesn't that return "all properties"?&amp;nbsp; In fact it does not (not that the previously mentioned methods return absolutely every property on an item either) and that may be confusing to some but it is the way it is.&amp;nbsp; What &lt;A href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx"&gt;AllProperties&lt;/A&gt; returns is the full EWS schema for the given item type - in other words the property list returned will change based on the message class of the item requested.&amp;nbsp; This decreases the value of this base shape, reducing it to more or less a lines-of-code-saver.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face=Arial&gt;Many of the EWS schema properties do not correlate directly to a single column on the item in the Exchange database, instead they are calculated on the client access server based on the values of multiple columns.&amp;nbsp; Some of these calculations, especially ones in the calendar folder, can be quite expensive.&amp;nbsp; In the &lt;A href="http://msdn.microsoft.com/en-us/library/aa564765(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa564765(EXCHG.80).aspx"&gt;CalendarItem&lt;/A&gt; schema there are four properties whose names indicate they may take a significant amount of effort to calculate: &lt;A href="http://msdn.microsoft.com/en-us/library/aa580822(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa580822(EXCHG.80).aspx"&gt;AdjacentMeetings&lt;/A&gt;, &lt;A href="http://msdn.microsoft.com/en-us/library/aa580264(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa580264(EXCHG.80).aspx"&gt;AdjacentMeetingCount&lt;/A&gt;, &lt;A href="http://msdn.microsoft.com/en-us/library/aa565461(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa565461(EXCHG.80).aspx"&gt;ConflictingMeetings&lt;/A&gt;, and &lt;A href="http://msdn.microsoft.com/en-us/library/aa563429(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa563429(EXCHG.80).aspx"&gt;ConflictingMeetingCount&lt;/A&gt;.&amp;nbsp; Calculating the values of these properties can be assumed to require knowing about all the other items in the calendar - it might be time consuming to do that for every item in the calendar.&amp;nbsp; What would performance be like if the request was for &lt;A href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx"&gt;AllProperties&lt;/A&gt; minus these four properties?..&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face=Arial&gt;&lt;STRONG&gt;The Solution&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face=Arial&gt;The first question is, "How do I request &lt;A href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx"&gt;AllProperties&lt;/A&gt; minus &lt;A href="http://msdn.microsoft.com/en-us/library/aa580822(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa580822(EXCHG.80).aspx"&gt;AdjacentMeetings&lt;/A&gt;, &lt;A href="http://msdn.microsoft.com/en-us/library/aa580264(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa580264(EXCHG.80).aspx"&gt;AdjacentMeetingCount&lt;/A&gt;, &lt;A href="http://msdn.microsoft.com/en-us/library/aa565461(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa565461(EXCHG.80).aspx"&gt;ConflictingMeetings&lt;/A&gt;, and &lt;A href="http://msdn.microsoft.com/en-us/library/aa563429(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa563429(EXCHG.80).aspx"&gt;ConflictingMeetingCount&lt;/A&gt;?"&amp;nbsp; The question, as stated, has no solution.&amp;nbsp; However the reverse is possible, request &lt;A href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx"&gt;IdOnly&lt;/A&gt; plus all the other &lt;A href="http://msdn.microsoft.com/en-us/library/aa564765(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa564765(EXCHG.80).aspx"&gt;CalendarItem&lt;/A&gt; schema properties by specifying the schema properties explicitly using their &lt;A href="http://msdn.microsoft.com/en-us/library/aa494315(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa494315(EXCHG.80).aspx"&gt;FieldURI&lt;/A&gt; adding them to the &lt;A href="http://msdn.microsoft.com/en-us/library/aa563810(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa563810(EXCHG.80).aspx"&gt;AdditionalProperties&lt;/A&gt; collection on the &lt;A href="http://msdn.microsoft.com/en-us/library/aa565261(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa565261(EXCHG.80).aspx"&gt;ItemShape&lt;/A&gt;.&amp;nbsp; The code looks something like this...&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: #2b91af"&gt;GetItemType &lt;/SPAN&gt;git = &lt;SPAN style="COLOR: blue"&gt;new &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;GetItemType&lt;/SPAN&gt;();
git.ItemIds = itemIds.ToArray();
git.ItemShape = &lt;SPAN style="COLOR: blue"&gt;new &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;ItemResponseShapeType&lt;/SPAN&gt;();
git.ItemShape.BaseShape = &lt;SPAN style="COLOR: #2b91af"&gt;DefaultShapeNamesType&lt;/SPAN&gt;.IdOnly;

&lt;SPAN style="COLOR: #2b91af"&gt;List&lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: #2b91af"&gt;BasePathToElementType&lt;/SPAN&gt;&amp;gt; props = &lt;SPAN style="COLOR: blue"&gt;new &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;List&lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: #2b91af"&gt;BasePathToElementType&lt;/SPAN&gt;&amp;gt;();

&lt;SPAN style="COLOR: green"&gt;// Only add these properties if we are querying the calendar folder...
&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;if &lt;/SPAN&gt;(folderId.Id == &lt;SPAN style="COLOR: #2b91af"&gt;DistinguishedFolderIdNameType&lt;/SPAN&gt;.calendar)
{
    &lt;SPAN style="COLOR: green"&gt;//props.Add(GetProp(UnindexedFieldURIType.calendarAdjacentMeetingCount));
    //props.Add(GetProp(UnindexedFieldURIType.calendarAdjacentMeetings));
    &lt;/SPAN&gt;props.Add(GetProp(&lt;SPAN style="COLOR: #2b91af"&gt;UnindexedFieldURIType&lt;/SPAN&gt;.calendarAllowNewTimeProposal));
    props.Add(GetProp(&lt;SPAN style="COLOR: #2b91af"&gt;UnindexedFieldURIType&lt;/SPAN&gt;.calendarAppointmentReplyTime));&lt;/PRE&gt;&lt;PRE class=code&gt;...&lt;/PRE&gt;&lt;PRE class=code&gt;}

git.ItemShape.AdditionalProperties = props.ToArray();&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;&lt;FONT size=2 face=Arial&gt;&lt;EM&gt;It might seem tedious to request each property explicitly, however this approach can ensure the efficiency of EWS client applications by eliminating unused data from requests and responses.&amp;nbsp; I'd consider this a best practice when requesting item properties.&amp;nbsp; Let's look at my test results:&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face=Arial&gt;&lt;EM&gt;First, I created a simple application which calls &lt;A href="http://msdn.microsoft.com/en-us/library/aa565934(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa565934(EXCHG.80).aspx"&gt;GetItem&lt;/A&gt; with &lt;A href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx"&gt;AllProperties&lt;/A&gt; against every appointment in a test account's calendar.&amp;nbsp; I tested with individual requests for each item and batching items in the requests.&amp;nbsp; Here are the results...&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;TABLE border=1 cellSpacing=0 cellPadding=2 width=377&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=68&gt;&lt;FONT size=2 face=Arial&gt;&lt;STRONG&gt;Items per request&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=76&gt;&lt;FONT size=2 face=Arial&gt;&lt;STRONG&gt;Total # of Requests&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=77&gt;&lt;FONT size=2 face=Arial&gt;&lt;STRONG&gt;Time (seconds) Test 1&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=77&gt;&lt;FONT size=2 face=Arial&gt;&lt;STRONG&gt;Time (seconds) &lt;BR&gt;Test 2&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=77&gt;&lt;FONT size=2 face=Arial&gt;&lt;STRONG&gt;Average Time (seconds)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=69&gt;&lt;FONT size=2 face=Arial&gt;1&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=76&gt;&lt;FONT size=2 face=Arial&gt;1432&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=78&gt;&lt;FONT size=2 face=Arial&gt;851&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=78&gt;&lt;FONT size=2 face=Arial&gt;895&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=78&gt;&lt;FONT size=2 face=Arial&gt;873&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=69&gt;&lt;FONT size=2 face=Arial&gt;25&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=76&gt;&lt;FONT size=2 face=Arial&gt;58&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=78&gt;&lt;FONT size=2 face=Arial&gt;762&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=78&gt;&lt;FONT size=2 face=Arial&gt;777&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=78&gt;&lt;FONT size=2 face=Arial&gt;769.5&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=69&gt;&lt;FONT size=2 face=Arial&gt;50&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=76&gt;&lt;FONT size=2 face=Arial&gt;29&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=78&gt;&lt;FONT size=2 face=Arial&gt;762&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=78&gt;&lt;FONT size=2 face=Arial&gt;759&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=78&gt;&lt;FONT size=2 face=Arial&gt;760.5&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P&gt;&lt;FONT size=2 face=Arial&gt;&lt;EM&gt;...And then I changed the application to call &lt;A href="http://msdn.microsoft.com/en-us/library/aa565934(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa565934(EXCHG.80).aspx"&gt;GetItem&lt;/A&gt; with &lt;A href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx"&gt;IdOnly&lt;/A&gt; and added every schema property except &lt;A href="http://msdn.microsoft.com/en-us/library/aa580822(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa580822(EXCHG.80).aspx"&gt;AdjacentMeetings&lt;/A&gt;, &lt;A href="http://msdn.microsoft.com/en-us/library/aa580264(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa580264(EXCHG.80).aspx"&gt;AdjacentMeetingCount&lt;/A&gt;, &lt;A href="http://msdn.microsoft.com/en-us/library/aa565461(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa565461(EXCHG.80).aspx"&gt;ConflictingMeetings&lt;/A&gt;, and &lt;A href="http://msdn.microsoft.com/en-us/library/aa563429(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa563429(EXCHG.80).aspx"&gt;ConflictingMeetingCount&lt;/A&gt;...&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;TABLE border=1 cellSpacing=0 cellPadding=2 width=377&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=68&gt;&lt;FONT size=2 face=Arial&gt;&lt;STRONG&gt;Items per request&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=76&gt;&lt;FONT size=2 face=Arial&gt;&lt;STRONG&gt;Total # of Requests&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=77&gt;&lt;FONT size=2 face=Arial&gt;&lt;STRONG&gt;Time (seconds) Test 1&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=77&gt;&lt;FONT size=2 face=Arial&gt;&lt;STRONG&gt;Time (seconds) &lt;BR&gt;Test 2&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=77&gt;&lt;FONT size=2 face=Arial&gt;&lt;STRONG&gt;Average Time (seconds)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=69&gt;&lt;FONT size=2 face=Arial&gt;1&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=76&gt;&lt;FONT size=2 face=Arial&gt;1432&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=78&gt;&lt;FONT size=2 face=Arial&gt;104&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=78&gt;&lt;FONT size=2 face=Arial&gt;105&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=78&gt;&lt;FONT size=2 face=Arial&gt;104.5&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=69&gt;&lt;FONT size=2 face=Arial&gt;25&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=76&gt;&lt;FONT size=2 face=Arial&gt;58&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=78&gt;&lt;FONT size=2 face=Arial&gt;15&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=78&gt;&lt;FONT size=2 face=Arial&gt;15&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=78&gt;&lt;FONT size=2 face=Arial&gt;15&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=69&gt;&lt;FONT size=2 face=Arial&gt;50&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=76&gt;&lt;FONT size=2 face=Arial&gt;29&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=78&gt;&lt;FONT size=2 face=Arial&gt;13&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=78&gt;&lt;FONT size=2 face=Arial&gt;13&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=78&gt;&lt;FONT size=2 face=Arial&gt;13&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P&gt;&lt;FONT size=2 face=Arial&gt;&lt;EM&gt;...As you can see the results aren't even close, those few extra properties really cost you.&amp;nbsp; In the end, it is best to request the properties needed explicitly.&amp;nbsp; The expense of calculated properties and the reality of what &lt;/EM&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx"&gt;&lt;EM&gt;AllProperties&lt;/EM&gt;&lt;/A&gt;&lt;EM&gt; actually returns greatly devalues this &lt;/EM&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx"&gt;&lt;EM&gt;BaseShape&lt;/EM&gt;&lt;/A&gt;&lt;EM&gt; and for most purposes it should be avoided.&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;FONT size=2 face=Arial&gt;Updated 8/15/08 - I forgot to include the code above...&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;FONT size=2 face=Arial&gt;Updated 1/22/2009 – Fixed broken GetProps link.&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Updated 9/25/2009 - Code should use BaseShape of IdOnly instead of AllProperties.&lt;/EM&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8861017" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+Web+Services/default.aspx">Exchange Web Services</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>Take Notice of Exchange Web Service Notifications</title><link>http://blogs.msdn.com/mstehle/archive/2008/07/24/take-notice-of-exchange-web-service-notifications.aspx</link><pubDate>Fri, 25 Jul 2008 00:11:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8770115</guid><dc:creator>mstehle</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/mstehle/comments/8770115.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mstehle/commentrss.aspx?PostID=8770115</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mstehle/rsscomments.aspx?PostID=8770115</wfw:comment><description>&lt;p&gt;&lt;font face="Arial" size="2"&gt;The Exchange API-spotting blog, which is run by the &lt;a href="http://msdn.microsoft.com/en-us/exchange/default.aspx"&gt;Exchange MSDN content&lt;/a&gt; and Exchange API product&amp;#160; folks, as a new &lt;a href="http://blogs.msdn.com/exchangedev/archive/2008/07/24/transitioning-to-exchange-web-services-notifications.aspx"&gt;post&lt;/a&gt; about the transition from store event sinks to Exchange Web Service &lt;a href="http://msdn.microsoft.com/en-us/library/aa579128(EXCHG.80).aspx"&gt;notifications&lt;/a&gt;.&amp;#160; The aim is to provide some more detail about &lt;a href="http://msdn.microsoft.com/en-us/library/aa579128(EXCHG.80).aspx"&gt;notifications&lt;/a&gt; and try to directly answer some questions that have been posed by developers about how &lt;a href="http://msdn.microsoft.com/en-us/library/aa579128(EXCHG.80).aspx"&gt;notifications&lt;/a&gt; can realistically replace store event sinks when they &lt;a href="http://blogs.msdn.com/exchangedev/archive/2008/05/22/exchange-developer-roadmap.aspx"&gt;go away&lt;/a&gt;.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;font face="Arial" size="2"&gt;...If you have feedback for the product team about the transition or any scenarios that you are concerned about, please comment on their blog post.&amp;#160; These posts are going up well before the next release of Exchange in order to keep you informed but also to hear what you have to say.&amp;#160; The nice thing about Exchange 2007 is that you have EWS notifications already available to test with so while your store sinks might work now, you should begin thinking about and testing the migration of your sink solution to one based on EWS notifications.&amp;#160; If you hit roadblocks now &lt;a href="http://blogs.msdn.com/tags/DevMsgTeam/default.aspx"&gt;my team&lt;/a&gt; can work with you on Exchange 2007 and get answers before the upcoming release where Exchange store sinks are not a fallback option...&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Arial" size="2"&gt;In fact, the Exchange MSDN content team has been very busy spreading the word about what the transition from the gang of de-emphasized APIs (CDO 1.21, CDOEX, WebDAV, etc.) to the new ones (EWS and Agents) will look like...&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Arial" size="2"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/cc535018(EXCHG.80).aspx"&gt;Migrating from Exchange 2007 Legacy APIs&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Arial" size="2"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/cc720858(EXCHG.80).aspx"&gt;Migrating to Exchange Web Services, Part 1: Messaging&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Arial" size="2"&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=CDE26EA9-5647-448F-A5E6-AE094A882EE5&amp;amp;displaylang=en"&gt;Exchange 2007 Legacy API Property Mapping&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8770115" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+General/default.aspx">Exchange General</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+Eventing/default.aspx">Exchange Eventing</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+Web+Services/default.aspx">Exchange Web Services</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>OUTBOX: Understanding and Fixing Slow Exchange Web Services Code (Part 1)</title><link>http://blogs.msdn.com/mstehle/archive/2008/07/17/outbox-understanding-and-fixing-slow-exchange-web-services-code-part-1.aspx</link><pubDate>Thu, 17 Jul 2008 21:39:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8744715</guid><dc:creator>mstehle</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/mstehle/comments/8744715.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mstehle/commentrss.aspx?PostID=8744715</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mstehle/rsscomments.aspx?PostID=8744715</wfw:comment><description>&lt;P&gt;&lt;FONT size=2 face=Arial&gt;Recently I was working with a customer who was concerned about Exchange Web Services performance.&amp;nbsp; He was testing some EWS code whose purpose was to retrieve all properties of every item in a mailbox.&amp;nbsp; The code was structured like this...&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT size=2 face=Arial&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/aa565934(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa565934(EXCHG.80).aspx"&gt;GetItem&lt;/A&gt; | &lt;A href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx"&gt;AllProperties&lt;/A&gt; - Get the root folder of the mailbox (one call)&lt;/FONT&gt; 
&lt;UL&gt;
&lt;LI&gt;&lt;FONT size=2 face=Arial&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/aa563918(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa563918(EXCHG.80).aspx"&gt;FindFolder&lt;/A&gt; | &lt;A href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx"&gt;AllProperties&lt;/A&gt; - Get the folder and the FolderIds of its sub folders (recursive, one call for each folder)&lt;/FONT&gt; 
&lt;UL&gt;
&lt;LI&gt;&lt;FONT size=2 face=Arial&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/aa566107(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa566107(EXCHG.80).aspx"&gt;FindItem&lt;/A&gt; | &lt;A href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx"&gt;AllProperties&lt;/A&gt; - Find each item in the folder (one call for each folder)&lt;/FONT&gt; 
&lt;UL&gt;
&lt;LI&gt;&lt;FONT size=2 face=Arial&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/aa565934(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa565934(EXCHG.80).aspx"&gt;GetItem&lt;/A&gt; | &lt;A href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx"&gt;AllProperties&lt;/A&gt; - Get the full set of properties on each item (one call for each item)&lt;/FONT&gt; &lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;FONT size=2 face=Arial&gt;This first thing to take note of is that there is too much information being requested in the base shapes of these requests.&amp;nbsp; Each of these requests is done requesting an &lt;A href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx"&gt;AllProperties&lt;/A&gt; base shape.&amp;nbsp; A very simple change to improve speed would be us to use &lt;A href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx"&gt;IdOnly&lt;/A&gt; base shapes on the requests until making the &lt;A href="http://msdn.microsoft.com/en-us/library/aa565934(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa565934(EXCHG.80).aspx"&gt;GetItem&lt;/A&gt; calls on the items themselves at which point all properties are desired...&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT size=2 face=Arial&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/aa565934(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa565934(EXCHG.80).aspx"&gt;GetItem&lt;/A&gt; | &lt;A href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx"&gt;IdOnly&lt;/A&gt;- Get the root folder of the mailbox (one call)&lt;/FONT&gt; 
&lt;UL&gt;
&lt;LI&gt;&lt;FONT size=2 face=Arial&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/aa563918(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa563918(EXCHG.80).aspx"&gt;FindFolder&lt;/A&gt; | &lt;A href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx"&gt;IdOnly&lt;/A&gt; - Get the folder and the FolderIds of its sub folders (recursive, one call for each folder)&lt;/FONT&gt; 
&lt;UL&gt;
&lt;LI&gt;&lt;FONT size=2 face=Arial&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/aa566107(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa566107(EXCHG.80).aspx"&gt;FindItem&lt;/A&gt; | &lt;A href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx"&gt;IdOnly&lt;/A&gt; - Find each item in the folder (one call for each folder)&lt;/FONT&gt; 
&lt;UL&gt;
&lt;LI&gt;&lt;FONT size=2 face=Arial&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/aa565934(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa565934(EXCHG.80).aspx"&gt;GetItem&lt;/A&gt; | &lt;A href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx"&gt;AllProperties&lt;/A&gt; - Get the full set of properties on each item (one call for each item)&lt;/FONT&gt; &lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;FONT size=2 face=Arial&gt;This code is still very chatty, it currently makes one &lt;A href="http://msdn.microsoft.com/en-us/library/aa563918(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa563918(EXCHG.80).aspx"&gt;FindFolder&lt;/A&gt; and one &lt;A href="http://msdn.microsoft.com/en-us/library/aa566107(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa566107(EXCHG.80).aspx"&gt;FindItem&lt;/A&gt; for each folder plus one &lt;A href="http://msdn.microsoft.com/en-us/library/aa565934(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa565934(EXCHG.80).aspx"&gt;GetItem&lt;/A&gt; for each item in the folders.&amp;nbsp; That is a lot of requests and responses going back and forth.&amp;nbsp; Fortunately, these calls can be restructured and combined to reduce chattiness.&amp;nbsp; Notice that &lt;A href="http://msdn.microsoft.com/en-us/library/aa563918(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa563918(EXCHG.80).aspx"&gt;FindFolder&lt;/A&gt; has the option for a deep traversal in its shape, this makes it possible to retrieve all the &lt;A href="http://msdn.microsoft.com/en-us/library/aa580509(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa580509(EXCHG.80).aspx"&gt;FolderIds&lt;/A&gt; for all folders underneath the mailbox root in a single request and response.&amp;nbsp; There is no deep traversal option in the base shape of a &lt;A href="http://msdn.microsoft.com/en-us/library/aa566107(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa566107(EXCHG.80).aspx"&gt;FindItem&lt;/A&gt; request and there is no &lt;A href="http://msdn.microsoft.com/en-us/library/aa565998(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa565998(EXCHG.80).aspx"&gt;ParentFolderIds&lt;/A&gt; property on the &lt;A href="http://msdn.microsoft.com/en-us/library/aa565934(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa565934(EXCHG.80).aspx"&gt;GetItem&lt;/A&gt; request but &lt;A href="http://msdn.microsoft.com/en-us/library/aa565934(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa565934(EXCHG.80).aspx"&gt;GetItem&lt;/A&gt; requests can request multiple &lt;A href="http://msdn.microsoft.com/en-us/library/aa563525(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa563525(EXCHG.80).aspx"&gt;ItemIds&lt;/A&gt;.&amp;nbsp; So while there still needs to be one &lt;A href="http://msdn.microsoft.com/en-us/library/aa566107(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa566107(EXCHG.80).aspx"&gt;FindItem&lt;/A&gt; request per folder, the &lt;A href="http://msdn.microsoft.com/en-us/library/aa565934(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa565934(EXCHG.80).aspx"&gt;GetItem&lt;/A&gt; calls can be batched instead of doing one per item...&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT size=2 face=Arial&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/aa563918(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa563918(EXCHG.80).aspx"&gt;FindFolder&lt;/A&gt; | &lt;A href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx"&gt;IdOnly&lt;/A&gt;, &lt;A title=Deep href="http://msdn.microsoft.com/en-us/library/aa563918(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa563918(EXCHG.80).aspx"&gt;Deep&lt;/A&gt; - Get the FolderId for every folder under the mailbox root (one call)&lt;/FONT&gt; 
&lt;UL&gt;
&lt;LI&gt;&lt;FONT size=2 face=Arial&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/aa566107(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa566107(EXCHG.80).aspx"&gt;FindItem&lt;/A&gt; | &lt;A href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx"&gt;IdOnly&lt;/A&gt; - Get the ItemIds for every item in the folder (one call per folder)&lt;/FONT&gt; 
&lt;UL&gt;
&lt;LI&gt;&lt;FONT size=2 face=Arial&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/aa565934(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa565934(EXCHG.80).aspx"&gt;GetItem&lt;/A&gt; | &lt;A href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx"&gt;AllProperties&lt;/A&gt; - Get the full set of properties on each item (approximately one call per folder)&lt;/FONT&gt; &lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;FONT size=2 face=Arial&gt;This greatly reduces the number of requests made and in turn increases the performance of the code.&amp;nbsp; Notice that for the &lt;A href="http://msdn.microsoft.com/en-us/library/aa565934(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa565934(EXCHG.80).aspx"&gt;GetItem&lt;/A&gt; call it says, "approximately one call per folder".&amp;nbsp; Just because an ItemId array of 1500 items can be sent with a &lt;A href="http://msdn.microsoft.com/en-us/library/aa565934(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa565934(EXCHG.80).aspx"&gt;GetItem&lt;/A&gt; request doesn't mean it is the best idea.&amp;nbsp; Certainly batching the &lt;A href="http://msdn.microsoft.com/en-us/library/aa565934(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa565934(EXCHG.80).aspx"&gt;GetItem&lt;/A&gt; calls help performance but this should be broken up into a "reasonable" amount of items per request - large requests can take minutes to process and return.&amp;nbsp; The ideal threshold can be determined by taking into account the deployment environment, application requirements, and testing results for each application.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;FONT size=2 face=Arial&gt;...Just to illustrate the point, here is some data from tests I did.&amp;nbsp; In this test I'm simply calling &lt;A href="http://msdn.microsoft.com/en-us/library/aa565934(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa565934(EXCHG.80).aspx"&gt;GetItem&lt;/A&gt;|&lt;A href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa580545(EXCHG.80).aspx"&gt;AllProperties&lt;/A&gt; on every item in a test account's inbox.&amp;nbsp; The folder has about 1500 items in it of vary sizes, some of the items are pretty large.&amp;nbsp; There is just one Exchange server with all roles installed on it.&amp;nbsp; The time recorded here is the time it takes to get through all the &lt;A href="http://msdn.microsoft.com/en-us/library/aa565934(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa565934(EXCHG.80).aspx"&gt;GetItem&lt;/A&gt; requests and responses for the items in the inbox.&amp;nbsp; "Items per Request" is the number of &lt;A href="http://msdn.microsoft.com/en-us/library/aa563525(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa563525(EXCHG.80).aspx"&gt;ItemIds&lt;/A&gt; included in each &lt;A href="http://msdn.microsoft.com/en-us/library/aa565934(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa565934(EXCHG.80).aspx"&gt;GetItem&lt;/A&gt; request.&amp;nbsp; Remember, these results are specific to my environment and what I'm doing in my code, your mileage may vary...&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;TABLE border=1 cellSpacing=0 cellPadding=2 width=588&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=113&gt;&lt;FONT size=2 face=Arial&gt;&lt;STRONG&gt;Items per Request&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=85&gt;&lt;FONT size=2 face=Arial&gt;&lt;STRONG&gt;Total # of Requests&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=95&gt;&lt;STRONG&gt;&lt;FONT size=2 face=Arial&gt;Time (seconds) Test 1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=97&gt;&lt;FONT size=2 face=Arial&gt;&lt;STRONG&gt;Time (seconds) Test 2&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=87&gt;&lt;FONT size=2 face=Arial&gt;&lt;STRONG&gt;Average Time&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=109&gt;&lt;FONT size=2 face=Arial&gt;&lt;STRONG&gt;Time per request&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=114&gt;&lt;FONT size=2 face=Arial&gt;1&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=85&gt;&lt;FONT size=2 face=Arial&gt;1531&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=94&gt;&lt;FONT size=2 face=Arial&gt;250&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=96&gt;&lt;FONT size=2 face=Arial&gt;262&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=86&gt;&lt;FONT size=2 face=Arial&gt;256&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=109&gt;&lt;FONT size=2 face=Arial&gt;0.17 seconds&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=113&gt;&lt;FONT size=2 face=Arial&gt;2&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=85&gt;&lt;FONT size=2 face=Arial&gt;766&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=94&gt;&lt;FONT size=2 face=Arial&gt;193&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=95&gt;&lt;FONT size=2 face=Arial&gt;188&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=86&gt;&lt;FONT size=2 face=Arial&gt;190.5&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=109&gt;&lt;FONT size=2 face=Arial&gt;0.25 seconds&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=113&gt;&lt;FONT size=2 face=Arial&gt;5&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=85&gt;&lt;FONT size=2 face=Arial&gt;307&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=93&gt;&lt;FONT size=2 face=Arial&gt;149&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=95&gt;&lt;FONT size=2 face=Arial&gt;151&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=86&gt;&lt;FONT size=2 face=Arial&gt;150&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=109&gt;&lt;FONT size=2 face=Arial&gt;0.49 seconds&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=113&gt;&lt;FONT size=2 face=Arial&gt;10&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=85&gt;&lt;FONT size=2 face=Arial&gt;154&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=93&gt;&lt;FONT size=2 face=Arial&gt;137&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=95&gt;&lt;FONT size=2 face=Arial&gt;135&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=85&gt;&lt;FONT size=2 face=Arial&gt;136&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=109&gt;&lt;FONT size=2 face=Arial&gt;0.88 seconds&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=114&gt;&lt;FONT size=2 face=Arial&gt;25&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=84&gt;&lt;FONT size=2 face=Arial&gt;62&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=93&gt;&lt;FONT size=2 face=Arial&gt;129&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=95&gt;&lt;FONT size=2 face=Arial&gt;129&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=85&gt;&lt;FONT size=2 face=Arial&gt;129&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=109&gt;&lt;FONT size=2 face=Arial&gt;2.08 seconds&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=114&gt;&lt;FONT size=2 face=Arial&gt;50&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=84&gt;&lt;FONT size=2 face=Arial&gt;31&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=93&gt;&lt;FONT size=2 face=Arial&gt;135&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=95&gt;&lt;FONT size=2 face=Arial&gt;130&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=85&gt;&lt;FONT size=2 face=Arial&gt;132.5&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=109&gt;&lt;FONT size=2 face=Arial&gt;4.27 seconds&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=114&gt;&lt;FONT size=2 face=Arial&gt;100&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=84&gt;&lt;FONT size=2 face=Arial&gt;16&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=93&gt;&lt;FONT size=2 face=Arial&gt;134&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=95&gt;&lt;FONT size=2 face=Arial&gt;131&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=85&gt;&lt;FONT size=2 face=Arial&gt;132.5&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=109&gt;&lt;FONT size=2 face=Arial&gt;8.28 seconds&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=114&gt;&lt;FONT size=2 face=Arial&gt;250&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=84&gt;&lt;FONT size=2 face=Arial&gt;7&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=93&gt;&lt;FONT size=2 face=Arial&gt;132&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=95&gt;&lt;FONT size=2 face=Arial&gt;131&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=85&gt;&lt;FONT size=2 face=Arial&gt;131.5&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=109&gt;&lt;FONT size=2 face=Arial&gt;18.79 seconds&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=114&gt;&lt;FONT size=2 face=Arial&gt;500&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=84&gt;&lt;FONT size=2 face=Arial&gt;4&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=93&gt;&lt;FONT size=2 face=Arial&gt;131&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=95&gt;&lt;FONT size=2 face=Arial&gt;134&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=85&gt;&lt;FONT size=2 face=Arial&gt;132.5&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=109&gt;&lt;FONT size=2 face=Arial&gt;33.13 seconds&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=114&gt;&lt;FONT size=2 face=Arial&gt;1000&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=84&gt;&lt;FONT size=2 face=Arial&gt;2&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=93&gt;&lt;FONT size=2 face=Arial&gt;133&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=95&gt;&lt;FONT size=2 face=Arial&gt;134&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=85&gt;&lt;FONT size=2 face=Arial&gt;133.5&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=109&gt;&lt;FONT size=2 face=Arial&gt;66.75 seconds&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=114&gt;&lt;FONT size=2 face=Arial&gt;2000&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=84&gt;&lt;FONT size=2 face=Arial&gt;1&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=93&gt;&lt;FONT size=2 face=Arial&gt;135&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=95&gt;&lt;FONT size=2 face=Arial&gt;131&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=85&gt;&lt;FONT size=2 face=Arial&gt;133&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=109&gt;&lt;FONT size=2 face=Arial&gt;133 seconds&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P&gt;...&lt;EM&gt;This is part one of a two part series, click &lt;A href="http://blogs.msdn.com/mstehle/archive/2008/08/13/outbox-understanding-and-fixing-slow-exchange-web-services-code-part-2.aspx" mce_href="http://blogs.msdn.com/mstehle/archive/2008/08/13/outbox-understanding-and-fixing-slow-exchange-web-services-code-part-2.aspx"&gt;here &lt;/A&gt;to read part two.&lt;/EM&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8744715" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+Web+Services/default.aspx">Exchange Web Services</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item><item><title>KB: Exchange Web Services Does Not Honor Inherited Permissions from Server Level Objects</title><link>http://blogs.msdn.com/mstehle/archive/2007/09/07/kb-exchange-web-services-does-not-honor-inherited-permissions-from-server-level-objects.aspx</link><pubDate>Fri, 07 Sep 2007 16:52:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4810706</guid><dc:creator>mstehle</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/mstehle/comments/4810706.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mstehle/commentrss.aspx?PostID=4810706</wfw:commentRss><wfw:comment>http://blogs.msdn.com/mstehle/rsscomments.aspx?PostID=4810706</wfw:comment><description>&lt;P&gt;&lt;EM&gt;The following KB article was just published based on a case I worked and bug that I filed against Exchange Web Services in Exchange 2007, have a look...&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;940846 Error message when an account tries to open a mailbox by using Outlook Web Access or Exchange Web Services in Exchange Server 2007: "You do not have permissions to open this mailbox"&lt;BR&gt;&lt;/STRONG&gt;&lt;A href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;940846" mce_href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;940846"&gt;http://support.microsoft.com/default.aspx?scid=kb;EN-US;940846&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Previously with other Exchange APIs and in earlier versions of Exchange Server if you set Receive-As rights at the server, storage group, organizational level, etc.&amp;nbsp;for a service account then you could access any mailbox under those objects with your service account.&amp;nbsp; This is &lt;STRONG&gt;*not* &lt;/STRONG&gt;the case with Exchange Web Services or Outlook Web Access in Exchange Server 2007.&amp;nbsp; In Exchange Server 2007, the underlying components shared by EWS and OWA do not aggregate the security descriptors of all the parent level objects of a mailbox to determine access - they only look at the mailbox security descriptor.&amp;nbsp; To workaround this, as the KB article states, you have two options...&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Use the &lt;A class="" href="http://technet.microsoft.com/en-us/library/bb124097.aspx" mce_href="http://technet.microsoft.com/en-us/library/bb124097.aspx"&gt;Add-MailboxPermission&lt;/A&gt; cmdlet to add permissions directly to the mailbox you would like to access&lt;/LI&gt;
&lt;LI&gt;For EWS, use &lt;A class="" href="http://blogs.msdn.com/mstehle/archive/2007/07/30/outbox-configuring-and-using-exchange-web-services-impersonation-in-exchange-2007.aspx" mce_href="http://blogs.msdn.com/mstehle/archive/2007/07/30/outbox-configuring-and-using-exchange-web-services-impersonation-in-exchange-2007.aspx"&gt;Impersonation&lt;/A&gt; to access the mailbox&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;This is issue only affects the shared underlying components of OWA and EWS in Exchange 2007.&amp;nbsp; It does not affect other Exchange 2007 APIs such as WebDAV, MAPI, and CDO.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;...The customer I was working with was using their experience from Exchange 2000/2003 to test their service account configuration for their WebDAV application in Exchange 2007 using OWA.&amp;nbsp; They had created their service account, applied permissions to a storage group using &lt;A class="" href="http://technet.microsoft.com/en-us/library/bb124403.aspx" mce_href="http://technet.microsoft.com/en-us/library/bb124403.aspx"&gt;Add-ADPermission&lt;/A&gt;&amp;nbsp;and were using OWA to verify that it was permissioned appropriately to allow access to all mailboxes in a storage group.&amp;nbsp; They got hung up on the fact that OWA wouldn't allow access and never tested their WebDAV application.&amp;nbsp; When they finally did a WebDAV test the service account accessed all mailboxes fine - even though they still could access the mailboxes with the service account using OWA.&amp;nbsp; This is because while OWA and WebDAV were closing tied in Exchange 2000/2003, in Exchange 2007 they are not - Exchange Web Services and Outlook Web Access are more closely related now...&lt;/EM&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4810706" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mstehle/archive/tags/Exchange+Web+Services/default.aspx">Exchange Web Services</category><category domain="http://blogs.msdn.com/mstehle/archive/tags/DevMsgTeam/default.aspx">DevMsgTeam</category></item></channel></rss>