<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>mstehle: The CDOs and CDONTS of Messaging Development</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/mstehle/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/mstehle/feed.xml</link>
    <description>Dedicated to Exchange and Outlook development topics of all kinds</description>
    <lastBuildDate>Tue, 16 Apr 2019 05:20:51 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>EWSEditor - February 2014 Release</title>
      <link>https://docs.microsoft.com/archive/blogs/mstehle/ewseditor-february-2014-release</link>
      <pubDate>Thu, 06 Feb 2014 07:54:44 GMT</pubDate>
      <dc:creator><![CDATA[mstehle [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mstehle/2014/02/06/ewseditor-february-2014-release/</guid>
      <description><![CDATA[There is a February 2014 Release of EWSEditor out now. Go get...]]></description>
      <content:encoded><![CDATA[<p>There is a February 2014 Release of EWSEditor out now. Go get it!</p>
<p><a href="https://blogs.msdn.com/b/webdav_101/archive/2014/02/05/february-release-of-ewseditor-1-8-0-32423.aspx">https://blogs.msdn.com/b/webdav_101/archive/2014/02/05/february-release-of-ewseditor-1-8-0-32423.aspx</a></p>]]></content:encoded>
    </item>
    <item>
      <title>EWSEditor December 2013 Release - New Project Owner</title>
      <link>https://docs.microsoft.com/archive/blogs/mstehle/ewseditor-december-2013-release-new-project-owner</link>
      <pubDate>Thu, 16 Jan 2014 20:23:00 GMT</pubDate>
      <dc:creator><![CDATA[mstehle [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mstehle/2014/01/16/ewseditor-december-2013-release-new-project-owner/</guid>
      <description><![CDATA[A few months ago I handed over the EWSEditor project to Dan Bagley from Dan's WebDav 101. He...]]></description>
      <content:encoded><![CDATA[<p>A few months ago I handed over the EWSEditor project to Dan Bagley from <a title="Dan's WebDav 101" href="https://blogs.msdn.com/b/webdav_101/">Dan's WebDav 101</a>. He promptly added a TON of new features and published a new release. Thanks, Dan!</p>
<p>To read more about the December 2013 update for EWSEditor check out Dan's post: <a href="https://blogs.msdn.com/b/webdav_101/archive/2013/12/31/december-2013-releases-of-ewseditor-1-7-3-27070-and-1-7-4-31181.aspx">https://blogs.msdn.com/b/webdav_101/archive/2013/12/31/december-2013-releases-of-ewseditor-1-7-3-27070-and-1-7-4-31181.aspx</a></p>
<p>To get your hands on the new build go to: <a href="https://ewseditor.codeplex.com">https://ewseditor.codeplex.com</a></p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Understand how Microsoft delivers Exchange in Office 365 Dedicated</title>
      <link>https://docs.microsoft.com/archive/blogs/mstehle/understand-how-microsoft-delivers-exchange-in-office-365-dedicated</link>
      <pubDate>Fri, 09 Aug 2013 08:15:00 GMT</pubDate>
      <dc:creator><![CDATA[Matt Stehle - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mstehle/2013/08/09/understand-how-microsoft-delivers-exchange-in-office-365-dedicated/</guid>
      <description><![CDATA[Here is a link to a great talk Konstantin Ryvkin gave at the Redmond Interoperability Protocols...]]></description>
      <content:encoded><![CDATA[<p>Here is a link to a great talk Konstantin Ryvkin gave at the Redmond Interoperability Protocols Plugfest this past June on Exchange in Office 365 Dedicated: </p>  <blockquote>   <p><a title="https://channel9.msdn.com/Events/Open-Specifications-Plugfests/Redmond-Interoperability-Protocols-Plugfest-2013/Exchange-Office-365-Dedicated" href="https://channel9.msdn.com/Events/Open-Specifications-Plugfests/Redmond-Interoperability-Protocols-Plugfest-2013/Exchange-Office-365-Dedicated">https://channel9.msdn.com/Events/Open-Specifications-Plugfests/Redmond-Interoperability-Protocols-Plugfest-2013/Exchange-Office-365-Dedicated</a></p> </blockquote>  <p>I’ve been working with Kostya on a number of partner engagements lately.&#160; This is a great depth understanding of Exchange Online in Office 365 Dedicated, how it is delivered to customers, and what that means for partner solutions. Dedicated is a very unique beast as compared to Exchange on-premises or even Exchange Online as part of Office 365 Multitenant/Shared. If this is a target environment for your solution, you should watch this presentation.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/55/72/metablogapi/3113.image_2181B89E.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-55-72-metablogapi/3113.image_5F00_2181B89E.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/55/72/metablogapi/0116.image_thumb_299B75A4.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-55-72-metablogapi/0116.image_5F00_thumb_5F00_299B75A4.png" width="325" height="199" /></a><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/55/72/metablogapi/1460.image_600C27A6.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-55-72-metablogapi/1460.image_5F00_600C27A6.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/55/72/metablogapi/2451.image_thumb_44F879FA.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-55-72-metablogapi/2451.image_5F00_thumb_5F00_44F879FA.png" width="382" height="189" /></a></p>]]></content:encoded>
    </item>
    <item>
      <title>Managing Affinity for EWS Impersonation in Exchange 2013 and Exchange Online W15</title>
      <link>https://docs.microsoft.com/archive/blogs/mstehle/managing-affinity-for-ews-impersonation-in-exchange-2013-and-exchange-online-w15</link>
      <pubDate>Thu, 25 Jul 2013 09:15:00 GMT</pubDate>
      <dc:creator><![CDATA[mstehle [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mstehle/2013/07/25/managing-affinity-for-ews-impersonation-in-exchange-2013-and-exchange-online-w15/</guid>
      <description><![CDATA[Updated 7/25/2013: This post has been re-written. The guidance is the same but I felt I...]]></description>
      <content:encoded><![CDATA[<table style="width: 672px;" cellspacing="0" cellpadding="2" border="1"><tbody>     <tr>       <td valign="top" width="670"><strong>Updated 7/25/2013:</strong> This post has been re-written. The guidance is the same but I felt I needed to clarify the problem scenario and solution as well as add some code. <strong>The guidance in this post relates only to using Exchange Impersonation with EWS in W15.</strong> Refer to my <a href="https://blogs.msdn.com/b/mstehle/archive/2013/04/17/changes-in-managing-affinity-for-ews-subscriptions.aspx">previous post</a> to understand the techniques for managing affinity for EWS Subscriptions changed between W14 and W15.</td>     </tr>   </tbody></table>&#160;&#160;&#160;&#160; <p>Consider the following <strong>scenario…</strong></p>  <blockquote>   <p><em>You have an Exchange Web Services based application or service that uses a service account which has been granted the ApplicationImpersonation role and makes EWS requests with the ExchangeImpersonation SOAP header to access target mailboxes. As the frequency of basic EWS requests (GetItem, FindItem, GetFolder, etc.) made by the application or service to different mailboxes increases, the round trip times decrease or in some cases the requests fail with 500/503 HTTP error responses from Exchange 2013 or Exchange Online (W15).</em></p> </blockquote>  <p>To get the best throughput for EWS requests using impersonation and avoid 500/503 errors use the following <strong>solution…</strong></p>  <blockquote>   <p><em>A high scale EWS-based application/service that uses impersonation needs to manage affinity with the backend Exchange server by adding an HTTP header called &quot;X-AnchorMailbox&quot; to requests with the ExchangeImpersonation SOAP header. The values of the X-AnchorMailbox HTTP header and the ExchangeImpesonation SOAP header on the request should match.</em></p> </blockquote>  <p>In April, I wrote a <a href="https://blogs.msdn.com/b/mstehle/archive/2013/04/17/changes-in-managing-affinity-for-ews-subscriptions.aspx">post</a> about EWS subscriptions in Exchange 2013 and Exchange Online (W15) which detailed the new rules for managing affinity. I concluded that post by saying…</p>  <blockquote>   <p>&quot;…[In W15] the only time affinity really should be managed by the client is subscription related requests like Subscribe, GetStreamingEvents, GetEvents, and Unsubscribe. Other requests like SyncFolderItems, FindItem, GetItem, etc. should not set X-PreferServerAffinity or return the X-BackEndOverrideCookie…&quot;</p> </blockquote>  <p>The statement above is mostly correct for simple EWS applications that aren't using impersonation. For migration applications, services monitoring and reacting to changes across organization-wide mailboxes, etc. that use impersonation to access target mailboxes this statement is false - these applications and services should manage affinity for any request made with the ExchangeImpersonation SOAP header.</p>  <blockquote>   <p><em>…Why? What's going on here?..</em></p> </blockquote>  <p>Like the subscription scenario, the need to manage affinity with impersonation goes back to changes in the CAS and MBX server roles between W14 and W15. As often explained, the CAS role is now just a smart proxy. Greg Taylor explained this most recently at <a href="https://channel9.msdn.com/Events/TechEd/NorthAmerica/2013/OUC-B31">TechEd</a>. Specifically, slide #4 shares &quot;the key to enlightenment&quot; as follows…</p>  <blockquote>   <p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/55/72/metablogapi/3718.image_2C34BB8F.png" original-url="https://blogs.msdn.com/cfs-filesystemfile.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-55-72-metablogapi/3718.image_5F00_2C34BB8F.png" /></p> </blockquote>  <p>When it comes to ApplicationImpersonation with EWS, we have to look at the assumption made in the Greg's second statement - &quot;Each CAS determines the right end point for the traffic…&quot; How does the CAS determine the right MBX server to send the traffic to? Well, for EWS at least, it is primarily based on the authenticating user. The CAS is not smart enough try and peel apart the EWS request</p>  <p><a href="https://blogs.msdn.com/b/mstehle/archive/2009/06/16/exchange-api-team-blog-exchange-impersonation-vs-delegate-access.aspx">As we know about impersonation in EWS</a>, the service account authenticates and the EWS request has a <a href="https://msdn.microsoft.com/en-us/library/exchange/aa565690(v=exchg.150).aspx">SOAP header</a> which notes the mailbox to be impersonated. What this means is that in W15 the CAS server is going to send your request to the MBX server where the service account's mailbox lives. If the target mailbox the service account is trying to impersonate does not reside on the same MBX server then the request is proxied to the right MBX. If the EWS application is a high scale service, sending many requests at a time that's a lot of proxying for one MBX to do. There are at least two possible outcomes: 1) At best, you'll notice your throughput drop off due to the proxying overhead. 2) At worst, if the MBX gets overwhelmed by all the proxying, your requests might start failing with 500 or 503 HTTP errors.</p>  <p>The solution is to set an HTTP header called X-AnchorMailbox to the same value that you set the <a href="https://msdn.microsoft.com/en-us/library/exchange/aa565690(v=exchg.150).aspx">ExchangeImpersonation</a> SOAP header's <a href="https://msdn.microsoft.com/en-us/library/exchange/aa581005(v=exchg.150).aspx">ConnectingSID</a> element value. The <a href="https://www.microsoft.com/en-us/download/details.aspx?id=35371">EWS Managed API</a> and <a href="https://archive.msdn.microsoft.com/ewsjavaapi">EWS Java API</a> will not do this automatically. However they both allow you to manually set X-AnchroMailbox using the <a href="https://msdn.microsoft.com/en-us/library/exchange/microsoft.exchange.webservices.data.exchangeservicebase.httpheaders(v=exchg.80).aspx">HttpHeaders</a> object which is a child of the ExchangeService object. You can use the HttpHeaders object's <a href="https://msdn.microsoft.com/EN-US/library/63ywd54z">Add method</a> to add the header name &quot;X-AnchorMailbox&quot; and set the value of that header to the same string used in ExchangeImpersonation. So in the example from <a href="https://blogs.msdn.com/b/mstehle/archive/2009/06/16/exchange-api-team-blog-exchange-impersonation-vs-delegate-access.aspx">this blog post</a>, the value of X-AnchorMailbox would be &quot;someone@contoso.com&quot;.</p>  <p>Here is an example of setting X-AnchorMailbox using the EWS Managed API, this is very similar to the EWS Java API…</p>  <div id="codeSnippetWrapper">   <div id="codeSnippet" style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &quot;Courier New&quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);">     <pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &quot;Courier New&quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"><span id="lnum1" style="color: rgb(96, 96, 96);"> 1:</span> <span style="color: rgb(0, 0, 255);">static</span> <span style="color: rgb(0, 0, 255);">void</span> GetInbox_EWSAPI(<span style="color: rgb(0, 0, 255);">string</span> serviceSmtp, <span style="color: rgb(0, 0, 255);">string</span> servicePass, </pre>
<!--CRLF-->

    <pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &quot;Courier New&quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"><span id="lnum2" style="color: rgb(96, 96, 96);"> 2:</span>     <span style="color: rgb(0, 0, 255);">string</span> targetSmtp)</pre>
<!--CRLF-->

    <pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &quot;Courier New&quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"><span id="lnum3" style="color: rgb(96, 96, 96);"> 3:</span> {</pre>
<!--CRLF-->

    <pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &quot;Courier New&quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"><span id="lnum4" style="color: rgb(96, 96, 96);"> 4:</span>     <span style="color: rgb(0, 128, 0);">// NOTE: Even though we're using the Exchange2010 schema, we have </span></pre>
<!--CRLF-->

    <pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &quot;Courier New&quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"><span id="lnum5" style="color: rgb(96, 96, 96);"> 5:</span>     <span style="color: rgb(0, 128, 0);">// to set the HTTP headers. The HTTP header is related to request </span></pre>
<!--CRLF-->

    <pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &quot;Courier New&quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"><span id="lnum6" style="color: rgb(96, 96, 96);"> 6:</span>     <span style="color: rgb(0, 128, 0);">// routing at the CAS layer, outside the EWS schema</span></pre>
<!--CRLF-->

    <pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &quot;Courier New&quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"><span id="lnum7" style="color: rgb(96, 96, 96);"> 7:</span>     ExchangeService service = <span style="color: rgb(0, 0, 255);">new</span> ExchangeService(ExchangeVersion.Exchange2010);</pre>
<!--CRLF-->

    <pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &quot;Courier New&quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"><span id="lnum8" style="color: rgb(96, 96, 96);"> 8:</span>     service.Credentials = <span style="color: rgb(0, 0, 255);">new</span> NetworkCredential(serviceSmtp, servicePass);</pre>
<!--CRLF-->

    <pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &quot;Courier New&quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"><span id="lnum9" style="color: rgb(96, 96, 96);"> 9:</span>&#160; </pre>
<!--CRLF-->

    <pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &quot;Courier New&quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"><span id="lnum10" style="color: rgb(96, 96, 96);"> 10:</span>     service.TraceEnabled = <span style="color: rgb(0, 0, 255);">true</span>;</pre>
<!--CRLF-->

    <pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &quot;Courier New&quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"><span id="lnum11" style="color: rgb(96, 96, 96);"> 11:</span>     service.TraceEnablePrettyPrinting = <span style="color: rgb(0, 0, 255);">true</span>;</pre>
<!--CRLF-->

    <pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &quot;Courier New&quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"><span id="lnum12" style="color: rgb(96, 96, 96);"> 12:</span>&#160; </pre>
<!--CRLF-->

    <pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &quot;Courier New&quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"><span id="lnum13" style="color: rgb(96, 96, 96);"> 13:</span>     <span style="color: rgb(0, 128, 0);">// Speed up the AutodiscoverUrl() method response time by skipping </span></pre>
<!--CRLF-->

    <pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &quot;Courier New&quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"><span id="lnum14" style="color: rgb(96, 96, 96);"> 14:</span>     <span style="color: rgb(0, 128, 0);">// a lookup for an SCP record in local AD since we know in this case </span></pre>
<!--CRLF-->

    <pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &quot;Courier New&quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"><span id="lnum15" style="color: rgb(96, 96, 96);"> 15:</span>     <span style="color: rgb(0, 128, 0);">// we're accessing O365</span></pre>
<!--CRLF-->

    <pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &quot;Courier New&quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"><span id="lnum16" style="color: rgb(96, 96, 96);"> 16:</span>     service.EnableScpLookup = <span style="color: rgb(0, 0, 255);">false</span>;</pre>
<!--CRLF-->

    <pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &quot;Courier New&quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"><span id="lnum17" style="color: rgb(96, 96, 96);"> 17:</span>           </pre>
<!--CRLF-->

    <pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &quot;Courier New&quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"><span id="lnum18" style="color: rgb(96, 96, 96);"> 18:</span>     <span style="color: rgb(0, 128, 0);">// NOTE: Use Autodiscover to get the EWS URL for the *target* mailbox,</span></pre>
<!--CRLF-->

    <pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &quot;Courier New&quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"><span id="lnum19" style="color: rgb(96, 96, 96);"> 19:</span>     <span style="color: rgb(0, 128, 0);">// not the service account. This recommendation is the same for W14 </span></pre>
<!--CRLF-->

    <pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &quot;Courier New&quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"><span id="lnum20" style="color: rgb(96, 96, 96);"> 20:</span>     <span style="color: rgb(0, 128, 0);">// and W15</span></pre>
<!--CRLF-->

    <pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &quot;Courier New&quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"><span id="lnum21" style="color: rgb(96, 96, 96);"> 21:</span>     service.AutodiscoverUrl(targetSmtp, <span style="color: rgb(0, 0, 255);">delegate</span> { <span style="color: rgb(0, 0, 255);">return</span> <span style="color: rgb(0, 0, 255);">true</span>; });</pre>
<!--CRLF-->

    <pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &quot;Courier New&quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"><span id="lnum22" style="color: rgb(96, 96, 96);"> 22:</span>&#160; </pre>
<!--CRLF-->

    <pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &quot;Courier New&quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"><span id="lnum23" style="color: rgb(96, 96, 96);"> 23:</span>     <span style="color: rgb(0, 128, 0);">// NOTE: Both the SOAP header &quot;ExchangeImpersonation&quot; and the HTTP header</span></pre>
<!--CRLF-->

    <pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &quot;Courier New&quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"><span id="lnum24" style="color: rgb(96, 96, 96);"> 24:</span>     <span style="color: rgb(0, 128, 0);">// &quot;X-AnchorMailbox&quot; are set to the SMTP of the target mailbox</span></pre>
<!--CRLF-->

    <pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &quot;Courier New&quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"><span id="lnum25" style="color: rgb(96, 96, 96);"> 25:</span>     service.ImpersonatedUserId = <span style="color: rgb(0, 0, 255);">new</span> ImpersonatedUserId(</pre>
<!--CRLF-->

    <pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &quot;Courier New&quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"><span id="lnum26" style="color: rgb(96, 96, 96);"> 26:</span>         ConnectingIdType.SmtpAddress, targetSmtp);</pre>
<!--CRLF-->

    <pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &quot;Courier New&quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"><span id="lnum27" style="color: rgb(96, 96, 96);"> 27:</span>&#160; </pre>
<!--CRLF-->

    <pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &quot;Courier New&quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"><span id="lnum28" style="color: rgb(96, 96, 96);"> 28:</span>     service.HttpHeaders.Add(<span style="color: rgb(0, 96, 128);">&quot;X-AnchorMailbox&quot;</span>, targetSmtp);</pre>
<!--CRLF-->

    <pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &quot;Courier New&quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"><span id="lnum29" style="color: rgb(96, 96, 96);"> 29:</span>&#160; </pre>
<!--CRLF-->

    <pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &quot;Courier New&quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"><span id="lnum30" style="color: rgb(96, 96, 96);"> 30:</span>     Folder inbox = Folder.Bind(service, WellKnownFolderName.Inbox);</pre>
<!--CRLF-->

    <pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &quot;Courier New&quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"><span id="lnum31" style="color: rgb(96, 96, 96);"> 31:</span> }</pre>
<!--CRLF--></div>
</div>

<p>You can see the effect of the X-AnchorMailbox&#160; by testing this code against Exchange Online W15 and comparing the response headers returned with the GetFolder response – assuming that the service account and target account mailboxes are on different MBX servers. You’ll notice in this test that the value of X-DiagInfo differs when this header is used. This is response header indicates which MBX server received the request.</p>]]></content:encoded>
    </item>
    <item>
      <title>HOWTO: Visual guide to turn on Exchange ActiveSync mailbox logging through OWA</title>
      <link>https://docs.microsoft.com/archive/blogs/mstehle/howto-visual-guide-to-turn-on-exchange-activesync-mailbox-logging-through-owa</link>
      <pubDate>Mon, 29 Apr 2013 10:51:15 GMT</pubDate>
      <dc:creator><![CDATA[mstehle [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mstehle/2013/04/29/howto-visual-guide-to-turn-on-exchange-activesync-mailbox-logging-through-owa/</guid>
      <description><![CDATA[Because I couldn’t find a better guide out there on the Internets already, some time ago I had...]]></description>
      <content:encoded><![CDATA[<p>Because I couldn’t find a better guide out there on the Internets already, some time ago I had created this visual walk through for collecting Exchange ActiveSync logs through OWA. Since it is pretty helpful and I reference it a lot – here it is. If I find a better guide on TechNet or elsewhere I’ll update this post with a link.</p>  <p><strong>STEP 1:</strong> Log into Outlook Web App and select “See All Options…” from the “Options” drop down on the upper right portion of the screen. In Exchange 2013, click the gear in the upper right than click on “Options”.</p>  <table cellspacing="0" cellpadding="5" width="418" border="0"><tbody>     <tr>       <td valign="top" width="203">Exchange 2010</td>        <td valign="top" width="213">Exchange 2013</td>     </tr>      <tr>       <td valign="top" width="203"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/55/72/metablogapi/0116.clip_image002_7759B773.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-55-72-metablogapi/0116.clip_5F00_image002_5F00_7759B773.png"><img title="clip_image002" style="display: inline; background-image: none;" border="0" alt="clip_image002" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/55/72/metablogapi/1106.clip_image002_thumb_085DE557.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-55-72-metablogapi/1106.clip_5F00_image002_5F00_thumb_5F00_085DE557.png" width="180" height="244" /></a></td>        <td valign="top" width="213"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/55/72/metablogapi/0842.clip_image004_676A72AF.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-55-72-metablogapi/0842.clip_5F00_image004_5F00_676A72AF.png"><img title="clip_image004" style="display: inline; background-image: none;" border="0" alt="clip_image004" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/55/72/metablogapi/3755.clip_image004_thumb_66920CC5.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-55-72-metablogapi/3755.clip_5F00_image004_5F00_thumb_5F00_66920CC5.png" width="190" height="244" /></a></td>     </tr>   </tbody></table>  <p>&#160;</p>  <p><strong>STEP 2:</strong> Select “Phone” from the menu at the left of the Options page. Select “Start Logging”.</p>  <table cellspacing="0" cellpadding="5" width="400" border="0"><tbody>     <tr>       <td valign="top" width="200">Exchange 2010</td>        <td valign="top" width="200">Exchange 2013</td>     </tr>      <tr>       <td valign="top" width="200"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/55/72/metablogapi/1524.clip_image006_05D4B399.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-55-72-metablogapi/1524.clip_5F00_image006_5F00_05D4B399.png"><img title="clip_image006" style="display: inline; background-image: none;" border="0" alt="clip_image006" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/55/72/metablogapi/8867.clip_image006_thumb_72B386EC.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-55-72-metablogapi/8867.clip_5F00_image006_5F00_thumb_5F00_72B386EC.png" width="244" height="121" /></a></td>        <td valign="top" width="200"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/55/72/metablogapi/0523.clip_image008_4B0D0AC2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-55-72-metablogapi/0523.clip_5F00_image008_5F00_4B0D0AC2.png"><img title="clip_image008" style="display: inline; background-image: none;" border="0" alt="clip_image008" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/55/72/metablogapi/3175.clip_image008_thumb_111DC7D6.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-55-72-metablogapi/3175.clip_5F00_image008_5F00_thumb_5F00_111DC7D6.png" width="244" height="135" /></a></td>     </tr>   </tbody></table>  <p>&#160;</p>  <p><strong>STEP 3:</strong> Now let the logging run and reproduce the behavior that you are trying to understand. After reproducing the behavior, let the logs settle for a minute and click “Retrieve Log” in OWA.</p>  <table cellspacing="0" cellpadding="5" width="400" border="0"><tbody>     <tr>       <td valign="top" width="200">Exchange 2010</td>        <td valign="top" width="200">Exchange 2013</td>     </tr>      <tr>       <td valign="top" width="200"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/55/72/metablogapi/1425.clip_image010_30606EA9.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-55-72-metablogapi/1425.clip_5F00_image010_5F00_30606EA9.png"><img title="clip_image010" style="display: inline; background-image: none;" border="0" alt="clip_image010" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/55/72/metablogapi/6886.clip_image010_thumb_41649C8C.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-55-72-metablogapi/6886.clip_5F00_image010_5F00_thumb_5F00_41649C8C.png" width="244" height="122" /></a></td>        <td valign="top" width="200"><b><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/55/72/metablogapi/0458.clip_image012_7598C5D2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-55-72-metablogapi/0458.clip_5F00_image012_5F00_7598C5D2.png"><img title="clip_image012" style="display: inline; background-image: none;" border="0" alt="clip_image012" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/55/72/metablogapi/2273.clip_image012_thumb_5F62AA80.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-55-72-metablogapi/2273.clip_5F00_image012_5F00_thumb_5F00_5F62AA80.png" width="244" height="133" /></a></b></td>     </tr>   </tbody></table>  <p>&#160;</p>  <p><strong>STEP 4:</strong> This will create a new item in your Inbox with the mailbox logs attached in a TXT file. The TXT file contains a log of all the Exchange ActiveSync captured between the device and the server while logging has been enabled. Forward this mail to the support or help desk person or use it to do your own analysis of the given issue.</p>  <table cellspacing="0" cellpadding="5" width="400" border="0"><tbody>     <tr>       <td valign="top" width="200">Exchange 2010</td>        <td valign="top" width="200">Exchange 2013</td>     </tr>      <tr>       <td valign="top" width="200"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/55/72/metablogapi/2185.clip_image014_6CC8BD86.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-55-72-metablogapi/2185.clip_5F00_image014_5F00_6CC8BD86.png"><img title="clip_image014" style="display: inline; background-image: none;" border="0" alt="clip_image014" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/55/72/metablogapi/4152.clip_image014_thumb_36E3C86C.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-55-72-metablogapi/4152.clip_5F00_image014_5F00_thumb_5F00_36E3C86C.png" width="244" height="134" /></a></td>        <td valign="top" width="200">         <p><b><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/55/72/metablogapi/8546.clip_image016_6B17F1B2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-55-72-metablogapi/8546.clip_5F00_image016_5F00_6B17F1B2.png"><img title="clip_image016" style="display: inline; background-image: none;" border="0" alt="clip_image016" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/55/72/metablogapi/3175.clip_image016_thumb_3C523910.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-55-72-metablogapi/3175.clip_5F00_image016_5F00_thumb_5F00_3C523910.png" width="236" height="244" /></a></b></p>       </td>     </tr>   </tbody></table>]]></content:encoded>
    </item>
    <item>
      <title>Changes in Managing Affinity for EWS Subscriptions…</title>
      <link>https://docs.microsoft.com/archive/blogs/mstehle/changes-in-managing-affinity-for-ews-subscriptions</link>
      <pubDate>Wed, 17 Apr 2013 05:27:00 GMT</pubDate>
      <dc:creator><![CDATA[Matt Stehle - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mstehle/2013/04/17/changes-in-managing-affinity-for-ews-subscriptions/</guid>
      <description><![CDATA[The basic principle of using subscriptions and notifications with Exchange Web Services (EWS) is...]]></description>
      <content:encoded><![CDATA[<p><span style="color: #424242; font-family: segoe ui; font-size: 10pt;">The basic principle of using subscriptions and notifications with Exchange Web Services (EWS) is that the Subscribe requests create subscriptions and GetEvents or GetStreamingEvents requests must find their way back to the same Exchange server where the subscriptions reside to get events from them. This post describes how an EWS client ensures this happens in Exchange 2010 vs. Exchange 2013. </span></p>
<p>&nbsp;</p>
<div style="margin-left: 36pt;">
<table style="background: #f2f2f2; border-collapse: collapse;" border="0"><colgroup><col style="width: 668px;" /></colgroup>
<tbody valign="top">
<tr>
<td style="border: 0.5pt solid currentcolor; padding-right: 7px; padding-left: 7px;">
<p><span style="color: #424242; font-family: segoe ui; font-size: 10pt;"><em>This post assumes you have some working knowledge of managing affinity for Exchange Web Services applications with Exchange 2010 and Wave 14 of Exchange Online. For a refresher, I'd suggest watching my talk on Channel9 found <a href="https://channel9.msdn.com/Events/Open-Specifications-Plugfests/Windows-Identity-and-Exchange-Protocols-Plugfest-2012/Exchange-Web-Services-Affinity-and-Throttling">here</a>.</em> </span></p>
<p><span style="color: #424242; font-family: segoe ui; font-size: 10pt;"><em>This post also assumes you have a general understanding of Subscriptions and Notifications. You can review my presentation on Channel9 <a href="https://channel9.msdn.com/Events/Open-Specifications-Plugfests/Windows-Identity-and-Exchange-Protocols-Plugfest-2012/Exchange-Web-Services-Best-Practices-Part-2" target="_blank">here</a> (skip to 13:19) or read <a href="https://msdn.microsoft.com/en-us/library/hh312849(v=exchg.140).aspx" target="_blank">this article</a> on MSDN for an overview.</em></span></p>
</td>
</tr>
</tbody>
</table>
</div>
<p>&nbsp;</p>
<p><span style="color: #424242; font-family: segoe ui; font-size: 10pt;">In Exchange 2010 (and W14 of Exchange Online) when an EWS client subscribed for notifications from a given mailbox folder it was the Client Access Server (CAS) that kept track of the active subscriptions. Office 365 and any substantial deployment of Exchange 2010 involved an array of CAS servers front-ended by a load balancer. This meant the EWS app only knew the URL of the load balancer and knew nothing of the servers behind it. </span></p>
<p><span style="color: #424242; font-family: segoe ui; font-size: 10pt;">The EWS app used cookies to ensure subscription-related requests went back to the same CAS through the load balancer. The cookie, provided on the first request to a CAS, was sent with subsequent Subscribe and GetStreamingEvents (streaming notifications) or GetEvents (pull notifications) requests and the load balancer was configured to create affinity between the cookie and a given CAS. </span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/55/72/metablogapi/1680.image_106545EE.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-55-72-metablogapi/1680.image_5F00_106545EE.png" target="_blank"><img style="display: inline; background-image: none;" title="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/55/72/metablogapi/2570.image_thumb_216973D1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-55-72-metablogapi/2570.image_5F00_thumb_5F00_216973D1.png" alt="image" width="450" height="327" border="0" /></a></p>
<p>&nbsp;</p>
<p><span style="font-family: segoe ui; font-size: 10pt;">The pseudo-code for an EWS app subscribing and getting events from multiple mailboxes looked like this: </span></p>
<ol>
<li><span style="font-family: segoe ui; font-size: 10pt;">Perform Autodiscover for each mailbox requesting the ExternalEwsUrl (mailbox1, mailbox2, mailbox3, etc.) </span></li>
<li><span style="font-family: segoe ui; font-size: 10pt;">Group the mailboxes by the ExternalEwsUrl </span></li>
<li>
<div><span style="font-family: segoe ui; font-size: 10pt;">For each group: </span></div>
<ol>
<li><span style="font-family: segoe ui; font-size: 10pt;">Send a Subscribe request for each mailbox in group to get a SubscriptionId (using ApplicationImpersonation) </span></li>
<li><span style="font-family: segoe ui; font-size: 10pt;">The first Subscribe response will contain a cookie called "exchangecookie", resend this cookie with all subsequent requests in this group. </span></li>
<li><span style="font-family: segoe ui; font-size: 10pt;">Group the SubscriptionIds (breaking down further into groups of 200 ids if needed) </span></li>
<li><span style="font-family: segoe ui; font-size: 10pt;">Send a GetStreamingEvents or GetEvents request for each group of SubscriptionIds (not using ApplicationImpersonation) </span></li>
</ol></li>
<li><span style="font-family: segoe ui; font-size: 10pt;">Pass events returned by GetStreamingEvents or GetEvents to a separate thread for processing </span></li>
</ol>
<p>&nbsp;</p>
<p><span style="font-family: segoe ui; font-size: 10pt;">With Office 365 W15 and Exchange 2013, changes to the server roles require some additional steps for the EWS app. The key change is that the CAS no longer manages the subscriptions, they are now managed by the Mailbox (MBX) server role. Now the load balancer and the CAS sit between the EWS app and the table of active subscriptions on the MBX server. The CAS does no processing of the EWS requests and just forwards them to the MBX for processing. The load balancer address in Office 365 is also simplified (<a href="https://outlook.office365.com/ews/exchange.asmx">https://outlook.office365.com/ews/exchange.asmx</a>) and not specific to any site other group boundary in the datacenter. The EWS app now needs to do some work to achieve the same basic objectives: (1) group the mailboxes by site and (2) make sure requests within a group find their way to the server behind the load balancer which knows about the subscription. </span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/55/72/metablogapi/0842.image_3582905A.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-55-72-metablogapi/0842.image_5F00_3582905A.png" target="_blank"><img style="display: inline; background-image: none;" title="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/55/72/metablogapi/6874.image_thumb_6D54D47D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-55-72-metablogapi/6874.image_5F00_thumb_5F00_6D54D47D.png" alt="image" width="476" height="290" border="0" /></a></p>
<p><span style="font-family: segoe ui; font-size: 10pt;">To do this given the changes in W15, the EWS app must implement the following logic: </span></p>
<p class="MsoListParagraphCxSpFirst" style="margin: 0in 0in 0pt 0.5in; line-height: normal; text-indent: -0.25in; list-style-type: disc; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-add-space: auto; mso-list: l0 level1 lfo1;"><span style="mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: ignore;"><span style="font-size: 11pt;">1.</span><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span><span style="mso-fareast-font-family: 'Times New Roman';"><span style="font-size: 10pt;">Call Autodiscover for each mailbox requesting the ExternalEwsUrl and a new setting called "GroupingInformation" (mailbox1, mailbox2, mailbox3, etc.) </span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in; line-height: normal; text-indent: -0.25in; list-style-type: disc; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-add-space: auto; mso-list: l0 level1 lfo1;"><span style="mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: ignore;"><span style="font-size: 11pt;">2.</span><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span><span style="mso-fareast-font-family: 'Times New Roman';"><span style="font-size: 10pt;">Group the mailboxes by a concatenation of ExternalEwsUrl + GroupingInformation </span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in; line-height: normal; text-indent: -0.25in; list-style-type: disc; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-add-space: auto; mso-list: l0 level1 lfo1;"><span style="mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: ignore;"><span style="font-size: 11pt;">3.</span><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span><span style="mso-fareast-font-family: 'Times New Roman';"><span style="font-size: 10pt;">For each group: </span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; line-height: normal; text-indent: -0.25in; list-style-type: disc; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-add-space: auto; mso-list: l0 level2 lfo1;"><span style="mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: ignore;"><span style="font-size: 11pt;">a.</span><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span><span style="mso-fareast-font-family: 'Times New Roman';"><span style="font-size: 10pt;">Send a Subscribe request for each mailbox in group to get a SubscriptionId (using ApplicationImpersonation) </span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1.5in; line-height: normal; text-indent: -1.5in; list-style-type: disc; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt;"><span style="mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: ignore;"><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 11pt;">i.</span><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span><span style="mso-fareast-font-family: 'Times New Roman';"><span style="font-size: 10pt;">Add a header to this request called "X-AnchorMailbox" with a value set the SMTP address of the first mailbox in the group </span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1.5in; line-height: normal; text-indent: -1.5in; list-style-type: disc; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt;"><span style="mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: ignore;"><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 11pt;">ii.</span><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span><span style="mso-fareast-font-family: 'Times New Roman';"><span style="font-size: 10pt;">Add a header to this request called "X-PreferServerAffinity" with a value set to "true" </span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1.5in; line-height: normal; text-indent: -1.5in; list-style-type: disc; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt;"><span style="mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: ignore;"><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 11pt;">iii.</span><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span><span style="mso-fareast-font-family: 'Times New Roman';"><span style="font-size: 10pt;">The first Subscribe response will contain a cookie called "X-BackEndOverrideCookie", resend this cookie with all subsequent requests in this group </span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; line-height: normal; text-indent: -0.25in; list-style-type: disc; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-add-space: auto; mso-list: l0 level2 lfo1;"><span style="mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: ignore;"><span style="font-size: 11pt;">b.</span><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span><span style="mso-fareast-font-family: 'Times New Roman';"><span style="font-size: 10pt;">Group the SubscriptionIds (breaking down further into groups of 200 ids if needed) </span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; line-height: normal; text-indent: -0.25in; list-style-type: disc; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-add-space: auto; mso-list: l0 level2 lfo1;"><span style="mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: ignore;"><span style="font-size: 11pt;">c.</span><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span><span style="mso-fareast-font-family: 'Times New Roman';"><span style="font-size: 10pt;">Send a GetStreamingEvents or GetEvents request for each group of SubscriptionIds (not using ApplicationImpersonation) </span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1.5in; line-height: normal; text-indent: -1.5in; list-style-type: disc; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt;"><span style="mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: ignore;"><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 11pt;">i.</span><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span><span style="mso-fareast-font-family: 'Times New Roman';"><span style="font-size: 10pt;">Add the "X-PreferServerAffinity" header set to "true" and the " X-BackEndOverrideCookie" to these requests as well </span></span></p>
<p class="MsoListParagraphCxSpLast" style="margin: 0in 0in 10pt 0.5in; line-height: normal; text-indent: -0.25in; list-style-type: disc; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-add-space: auto; mso-list: l0 level1 lfo1;"><span style="mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: ignore;"><span style="font-size: 11pt;">4.</span><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span><span style="mso-fareast-font-family: 'Times New Roman';"><span style="font-size: 10pt;">Pass events returned by GetStreamingEvents or GetEvents to a separate thread for processing </span></span></p>
<p><span style="font-family: segoe ui; font-size: 10pt;">Initially, the X-AnchorMailbox header is what directs the CAS to send the request to a specific MBX server. The response to that initial request has a cookie called "X-BackEndOverrideCookie", this cookie works similar to the "exchangecookie" in W14 in that it can be used on subsequent requests to ensure they find their way back to the same MBX server. However, it also requires at the X-PreferServerAffinity HTTP header. This forces the client to be very intentional about creating affinity to a particular MBX server. <strong>That is because (unlike in W14) the only time affinity really should be managed by the client is subscription related requests like Subscribe, GetStreamingEvents, GetEvents, and Unsubscribe. Other requests like SyncFolderItems, FindItem, GetItem, etc. should not set X-PreferServerAffinity or return the X-BackEndOverrideCookie.***</strong></span></p>
<div style="margin-left: 36pt;">
<table style="background: #f2f2f2; border-collapse: collapse;" border="0"><colgroup><col style="width: 668px;" /></colgroup>
<tbody valign="top">
<tr>
<td style="border: 0.5pt solid currentcolor; padding-right: 7px; padding-left: 7px;"><span style="font-family: segoe ui; font-size: 10pt;"><strong>***Updated 7/17/2013:</strong> For the most part the above is still true but if you are using Exchange Impersonation <a href="https://blogs.msdn.com/b/mstehle/archive/2013/07/17/more-affinity-considerations-for-exchange-online-and-exchange-2013.aspx">this post</a> explains why/how you might also want to manage affinity.</span></td>
</tr>
</tbody>
</table>
</div>]]></content:encoded>
    </item>
    <item>
      <title>EWSEditor August 2012 Release</title>
      <link>https://docs.microsoft.com/archive/blogs/mstehle/ewseditor-august-2012-release</link>
      <pubDate>Wed, 01 Aug 2012 07:06:00 GMT</pubDate>
      <dc:creator><![CDATA[mstehle [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mstehle/2012/08/01/ewseditor-august-2012-release/</guid>
      <description><![CDATA[Download it now!&nbsp; Thank you for using and providing feedback on EWSEditor since the December...]]></description>
      <content:encoded><![CDATA[<p><a title="Download it now!" href="https://ewseditor.codeplex.com/releases/view/92038">Download it now!</a>&nbsp; Thank you for using and providing feedback on EWSEditor since the December 2011 release and update.&nbsp; Hopefully you've been watching the check-ins in response to that feedback.&nbsp; While you can download the source at any time and build the latest check-in, I figured updating the published release was long overdue.&nbsp; Here is a list of the changes, fixes, and new features in the August 2012 release...</p>
<ul>
<li>Fixed: <a id="TitleLink0" href="https://ewseditor.codeplex.com/workitem/1047">Unhandled exception from certificate status "unknown"</a></li>
<li>Fixed: <a id="TitleLink1" href="https://ewseditor.codeplex.com/workitem/970">Minor spelling mistake on main context menu</a></li>
<li>Fixed: <a id="TitleLink4" href="https://ewseditor.codeplex.com/workitem/1027">typo 'LastResponseTiem' in property editor</a></li>
<li>Fixed: <a id="TitleLink7" href="https://ewseditor.codeplex.com/workitem/993">Sorting item views by date/time fields sorts lexically, not by date value</a></li>
<li>Fixed: <a id="TitleLink8" href="https://ewseditor.codeplex.com/workitem/1043">Folder permissions dialog bugs</a></li>
<li>Changed: <a id="TitleLink6" href="https://ewseditor.codeplex.com/workitem/1011">Update to EWS Managed API 1.2.1</a></li>
<li>Changed: <a id="TitleLink3" href="https://ewseditor.codeplex.com/workitem/1013">Allow Autodiscover redirects by default</a></li>
<li>Added: <a id="TitleLink2" href="https://ewseditor.codeplex.com/workitem/1012">RequestId and X-DiagInfo Logging</a></li>
<li>Added: <a id="TitleLink5" href="https://ewseditor.codeplex.com/workitem/1010">Streaming Notifications dialog</a></li>
</ul>
<p>The most significant new feature is the streaming notification dialog which <a title="Rick Hallihan" href="https://blogs.msdn.com/b/rickhall/">Rick Hallihan</a> added.&nbsp; Thanks, Rick!&nbsp;&nbsp;Another new feature - EWSEditor will now&nbsp;pull out the <a title="RequestId" href="https://blogs.msdn.com/b/exchangedev/archive/2012/06/18/exchange-web-services-managed-api-1-2-1-now-released.aspx">RequestId</a> and X-DiagInfo headers from responses and write them to the log.</p>]]></content:encoded>
    </item>
    <item>
      <title>Exchange 2013 Developer Resources on MSDN</title>
      <link>https://docs.microsoft.com/archive/blogs/mstehle/exchange-2013-developer-resources-on-msdn</link>
      <pubDate>Fri, 20 Jul 2012 10:52:52 GMT</pubDate>
      <dc:creator><![CDATA[mstehle [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mstehle/2012/07/20/exchange-2013-developer-resources-on-msdn/</guid>
      <description><![CDATA[EWS Managed API 2.0 Technical...]]></description>
      <content:encoded><![CDATA[<p>EWS Managed API 2.0 Technical Preview</p>
<p><a href="https://www.microsoft.com/en-us/download/details.aspx?id=30391">https://www.microsoft.com/en-us/download/details.aspx?id=30391</a></p>
<p>What's new in the EWS Managed API?</p>
<p><a href="https://msdn.microsoft.com/en-us/library/jj220500(EXCHG.80).aspx">https://msdn.microsoft.com/en-us/library/jj220500(EXCHG.80).aspx</a></p>
<p>101 EWS Managed API 2.0 Code Samples</p>
<p><a href="https://code.msdn.microsoft.com/Exchange-2013-101-Code-3c38582c">https://code.msdn.microsoft.com/Exchange-2013-101-Code-3c38582c</a></p>
<p><a href="https://code.msdn.microsoft.com/Exchange-2013-101-Code-3c38582c"></a></p>
<p>Exchange 2013 Preview SDK</p>
<p><a href="https://msdn.microsoft.com/en-us/library/jj162981(office.15).aspx">https://msdn.microsoft.com/en-us/library/jj162981(office.15).aspx</a></p>
<p><a href="https://msdn.microsoft.com/en-us/library/jj162981(office.15).aspx"></a>What's new in EWS in Exchange 2013 Preview?</p>
<p><a href="https://msdn.microsoft.com/en-us/library/jj190903(EXCHG.150).aspx">https://msdn.microsoft.com/en-us/library/jj190903(EXCHG.150).aspx</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Check Lync 2013 developer training on MSDN...</title>
      <link>https://docs.microsoft.com/archive/blogs/mstehle/check-lync-2013-developer-training-on-msdn</link>
      <pubDate>Fri, 20 Jul 2012 08:46:20 GMT</pubDate>
      <dc:creator><![CDATA[mstehle [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mstehle/2012/07/20/check-lync-2013-developer-training-on-msdn/</guid>
      <description><![CDATA[The Lync product group also has Lync 2013 training posted to MSDN.&nbsp; Including a discussion of...]]></description>
      <content:encoded><![CDATA[<p>The Lync product group also has Lync 2013 training posted to MSDN.&nbsp; Including a discussion of the new UC Web API.&nbsp; Check it out..</p>
<p><a href="https://msdn.microsoft.com/en-US/lync/jj543530">https://msdn.microsoft.com/en-US/lync/jj543530</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Check out webcasts and samples for Office 2013 and SharePoint 2013 App development..</title>
      <link>https://docs.microsoft.com/archive/blogs/mstehle/check-out-webcasts-and-samples-for-office-2013-and-sharepoint-2013-app-development</link>
      <pubDate>Fri, 20 Jul 2012 08:41:16 GMT</pubDate>
      <dc:creator><![CDATA[mstehle [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mstehle/2012/07/20/check-out-webcasts-and-samples-for-office-2013-and-sharepoint-2013-app-development/</guid>
      <description><![CDATA[There are a number of good, short webcasts posted on the Office Developer Center of...]]></description>
      <content:encoded><![CDATA[<p>There are a number of good, short webcasts posted on the Office Developer Center of MSDN:</p>
<p><a href="https://msdn.microsoft.com/en-US/office/apps/fp123626">https://msdn.microsoft.com/en-US/office/apps/fp123626</a></p>
<p>Also, code.msdn.Microsoft.com has an "office" section with tons of sample apps and projects to look at for different versions of Exchange, SharePoint, etc.</p>
<p><a href="https://code.msdn.microsoft.com/office">https://code.msdn.microsoft.com/office</a></p>]]></content:encoded>
    </item>
  </channel>
</rss>